-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Ember.Component attributeBindings doesn't work with namespaced attributes? (e.g. xlink:href) #9298
Comments
related: #9297 |
For now my workaround is to have the computed property set the attribute directly: src: function(key, value) {
if(arguments.length > 1) {
this.$().attr('xlink:href', value);
}
return this.$().attr('xlink:href');
}.property(), |
@stefanpenner what's the next step for this? |
@Blesh Your workaround doesn't work for me. I get |
@cwarny - It's hard to say without seeing it reproduced. For now the work around works fine for me. (but I'm still in 1.7.0-beta.5, for at least the next week or so) |
Here is my use case:
And each tile-image is called in a Do you notice anything weird? I'm using Ember 1.8.1 |
Oh... remove the |
It's probably me being silly but when I drop that from |
Possibly. The work around above worked in my specific scenario. You could also just observe Something like: src: undefined,
_updateLinkHref: function(){
this.$().attr('link:href', this.get('src'));
},
_updateSrc: function(){
Ember.run.once('afterRender', this, this._updateLinkHref);
}.observes('src').on('didInsertElement'), |
This is also tracked by tildeio/htmlbars#224 |
@oneeman is going to implement a plan described at #10186 (comment), I believe. |
[BUGFIX] Handle binding namespaced attributes (#9298)
The following code produces undesired results:
It ends up setting
xlink="/mericuh-flag.gif"
rather thanxlink:href="/mericuh-flag.gif"
Suggested workaround from @ebryn was to use an observer and manually set, which I'm fine with for now.
The text was updated successfully, but these errors were encountered: