Skip to content

Commit

Permalink
Merge pull request #1 from knownasilya/patch-1
Browse files Browse the repository at this point in the history
Fix noodle example
  • Loading branch information
mixonic committed Sep 21, 2016
2 parents dcc2410 + 4de94e0 commit be19fe8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions text/0111-element-modifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ export default Ember.ElementModifier.extend({
},

didRender() {
document.addEventListener(this.attrs.mouseover, this._logMouseover);
document.addEventListener(this.attrs.logEvent, this._logMouseover);
},

didUpdateAttrs(newAttrs, oldAttrs) {
document.removeEventListener(oldAttrs.mouseover, this._logMouseover);
document.removeEventListener(oldAttrs.logEvent, this._logMouseover);
},

willDestroyElement() {
document.removeEventListener(this.attrs.mouseover, this._logMouseover);
document.removeEventListener(this.attrs.logEvent, this._logMouseover);
}

});
Expand All @@ -156,21 +156,21 @@ const Noodle = Ember.ElementModifier.extend({
},

didRender() {
document.addEventListener(this.attrs.mouseover, this._logMouseover);
document.addEventListener(this.attrs.logEvent, this._logMouseover);
},

didUpdateAttrs(newAttrs, oldAttrs) {
document.removeEventListener(oldAttrs.mouseover, this._logMouseover);
document.removeEventListener(oldAttrs.logEvent, this._logMouseover);
},

willDestroyElement() {
document.removeEventListener(this.attrs.mouseover, this._logMouseover);
document.removeEventListener(this.attrs.logEvent, this._logMouseover);
}

});

Noodle.reopenClass({
positionalParams: ['mouseover']
positionalParams: ['logEvent']
});

export default Noodle;
Expand Down Expand Up @@ -205,7 +205,7 @@ value of an HTML element-space string for example) without namespace conflicts.
to scenario-solve event listeners across native elements, Ember component root elements, and
web components. It failed to reach a unified design that could serve all three
options. Since there does not appear to be an ideal unified solution, kicking
the challenge to use-space for a few cycles seems ideal.
the challenge to user-space for a few cycles seems ideal.

Additionally, there are other uses for element modifiers beyond event listener
attachment. These may also have specific, narrow fixes.
Expand Down

0 comments on commit be19fe8

Please sign in to comment.