Skip to content

Instantly share code, notes, and snippets.

@jhubert
Created August 19, 2012 01:11
Show Gist options
  • Save jhubert/3390740 to your computer and use it in GitHub Desktop.
Save jhubert/3390740 to your computer and use it in GitHub Desktop.
YUI.add("import-waiting-view", (function(Y) {
var prototypeOptions = {
initializer: function() {
console.log('Initialized');
this.publish('finished', {
broadcast: true,
fireOnce: true
})
},
render: function() {
this.get('container');
this.fire('finished');
return this;
}
};
Y.namespace("BMP").ImportWaitingView = Y.Base.create("import-waiting-view", Y.View, [], prototypeOptions, {});
}), "0.0.1", { requires: ["base", "node", "get", "view", "handlebars"] });
<div id="demo"></div>
<script type="text/javascript">
YUI().use('import-waiting-view', function (Y) {
iwv = new Y.BMP.ImportWaitingView();
iwv.render();
Y.one('#demo').on('import-waiting-view:finished', function (e, f, g) { console.log(e, f, g) })
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment