File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -567,6 +567,11 @@ var proto = Object.create(ANode.prototype, {
567567 return ;
568568 }
569569
570+ if ( attr === 'mixin' ) {
571+ this . updateMixins ( ) ;
572+ return ;
573+ }
574+
570575 HTMLElement . prototype . removeAttribute . call ( this , attr ) ;
571576 }
572577 } ,
Original file line number Diff line number Diff line change @@ -131,6 +131,16 @@ module.exports = registerElement('a-node', {
131131 value : function ( newMixins , oldMixins ) {
132132 var newMixinsIds = newMixins ? newMixins . trim ( ) . split ( / \s + / ) : [ ] ;
133133 var oldMixinsIds = oldMixins ? oldMixins . trim ( ) . split ( / \s + / ) : [ ] ;
134+
135+ if ( ! newMixins ) {
136+ var mixinEls = this . mixinEls ;
137+ for ( var i = 0 ; i < mixinEls . length ; i ++ ) {
138+ this . unregisterMixin ( mixinEls [ i ] . id ) ;
139+ }
140+ HTMLElement . prototype . removeAttribute . call ( this , 'mixin' ) ;
141+ return ;
142+ }
143+
134144 // To determine what listeners will be removed
135145 var diff = oldMixinsIds . filter ( function ( i ) { return newMixinsIds . indexOf ( i ) < 0 ; } ) ;
136146 this . mixinEls = [ ] ;
You can’t perform that action at this time.
0 commit comments