Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Handle binding namespaced attributes (#9298) #10365

Merged
merged 1 commit into from
Feb 7, 2015
Merged

[BUGFIX] Handle binding namespaced attributes (#9298) #10365

merged 1 commit into from
Feb 7, 2015

Conversation

oneeman
Copy link
Contributor

@oneeman oneeman commented Feb 6, 2015

Resolves #9298 as proposed in #10186 (comment).

@rwjblue
Copy link
Member

rwjblue commented Feb 6, 2015

Small clarification, this cannot be pulled into beta (since #10186 is only on master). Can you remove the [BUGFIX beta] prefix (or explain if I am missing something obvious)?

@oneeman
Copy link
Contributor Author

oneeman commented Feb 6, 2015

No, I'm the one who was missing something. Will do.

@oneeman oneeman changed the title [BUGFIX beta] Handle binding namespaced attributes (#9298) [BUGFIX] Handle binding namespaced attributes (#9298) Feb 6, 2015
run(function () {
view.set('xlinkHref', '/bar.png');
});
equal(view.$().attr('xlink:href'), '/bar.png', "namespaced attribute is updated");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this pass in IE8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know. Was going to try it out with an interactive saucelabs session just now, but both it and master stop with 0 of 3 assertions passed: http://imgur.com/rP5PVTA. I can try tonight to see if it's a problem with my set-up or if something needs to be fixed. IE 9 passes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do something like the following in HTMLBars for setAttributeNS detection:

var doc = typeof document === 'undefined' ? false : document;
if (doc && doc.createElementNS) { 
  /* do stuff */
}

That might work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I was using npm start instead of ember serve --environment=production. Did it again using the latter and all the tests in the module (including the one I added) pass in IE8.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough for me, thank you!

@mixonic
Copy link
Member

mixonic commented Feb 6, 2015

@rwjblue I'd also like to land this into 1.11!

rwjblue added a commit that referenced this pull request Feb 7, 2015
[BUGFIX] Handle binding namespaced attributes (#9298)
@rwjblue rwjblue merged commit 38f2b8e into emberjs:master Feb 7, 2015
@oneeman oneeman deleted the bind-namespaced-attributes branch February 7, 2015 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember.Component attributeBindings doesn't work with namespaced attributes? (e.g. xlink:href)
3 participants