admin管理员组文章数量:1390391
In DojoToolkit documentation, the page "Creating a custom widget" (this one) it's said that in order to instantiate the new widget, you use the following code:
var widget = new AuthorWidget(author).placeAt(authorContainer);
I spent quite some time trying to find the documentation for "placeAt" method, and can't find it.
Now I know Dijit's widgets are derived from dijit/_WidgetBase
and dijit/_TemplatedMixin
classes, but this method isn't in any of these classes.
The nearest thing that searches find is domConstruct.place()
method.
Anyone knows where the documentation for this method is ?
In DojoToolkit documentation, the page "Creating a custom widget" (this one) it's said that in order to instantiate the new widget, you use the following code:
var widget = new AuthorWidget(author).placeAt(authorContainer);
I spent quite some time trying to find the documentation for "placeAt" method, and can't find it.
Now I know Dijit's widgets are derived from dijit/_WidgetBase
and dijit/_TemplatedMixin
classes, but this method isn't in any of these classes.
The nearest thing that searches find is domConstruct.place()
method.
Anyone knows where the documentation for this method is ?
Share Improve this question edited Jan 3, 2017 at 8:33 Bourbia Brahim 14.7k4 gold badges43 silver badges54 bronze badges asked Jan 2, 2017 at 20:56 Nelson TeixeiraNelson Teixeira 6,6006 gold badges45 silver badges87 bronze badges 1-
it's already a function inside
dijit/_WidgetBase
. – Bourbia Brahim Commented Jan 3, 2017 at 7:29
1 Answer
Reset to default 6placeAt(reference,position)
can be found in moduledijit/_WidgetBase
and it provides a shorthand mechanism to put an existing (or newly created) Widget in the dom.
Examples:
// create a Button with no srcNodeRef, and place it in the body:
var button = new Button({ label:"click" }).placeAt(win.body());
Link to documentation: http://dojotoolkit/api/?qs=1.10/dijit/_WidgetBase
本文标签: javascriptDojoToolkit widgetplaceAt() method referenceStack Overflow
版权声明:本文标题:javascript - DojoToolkit widget.placeAt() method reference - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744697812a2620385.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论