Last active
December 11, 2015 06:28
-
-
Save richardscarrott/4558947 to your computer and use it in GitHub Desktop.
Test case for - https://github.com/createthegroup/ply/issues/2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ply.ui.define('html', { | |
__elements: { | |
body: 'body' | |
}, | |
__partials: { | |
body: 'body' | |
}, | |
__notifications: { | |
'my-note': 'callback' | |
}, | |
callback: function () { | |
console.log(this.name); | |
} | |
}); | |
Ply.ui.define('body', { | |
__notifications: { | |
'my-note': 'callback' | |
}, | |
callback: function () { | |
console.log(this.name); | |
// ignore and add new listner. | |
Ply.core.ignore(this.notifications['my-note']); | |
Ply.core.listen('my-note', function () { | |
console.log('This function will incorrectly replace the html views callback.'); | |
}, this); | |
} | |
}); | |
Ply.ui.register('html', { view: 'html' }); | |
Ply.core.notify('my-note'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment