The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 14 more by this user. Created: 10/12/11
Project: YUI 3
License: YUI BSD
YUI Version: 3.4.1
Free for use.
Similar to Y.Widget.getByNode, this module adds a Y.View.getByNode. Note that in order to get Views you create, you will need to extend them with Y.Ext.ViewByNode.
YUI().use('gallery-viewbynode', 'base-build', function(Y) {
var MyView = Y.Base.create('my-view', Y.View, [Y.Ext.ViewByNode],{
render : function () {
if (!this.container.inDoc()) {
Y.one('body').append(this.container);
}
}
},{});
var inst = new MyView();
inst.render();
Y.View.getByNode(inst.container); // Returns inst
});
All code on this site is licensed under the BSD License unless stated otherwise.