Opened 7 years ago
Closed 7 years ago
#17414 closed defect (wontfix)
parser.instantiate - no result
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Parser | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I dont know how to use parser.instantiate(). I tried several solutions but no result, resp. empty array. What is wrong?
<div id="myDiv" name="ABC" value="1"></div>
<script>
require(["dojo/parser", "dojo/dom"], function(parser, dom) {
parser.instantiate([dom.byId("myDiv")], {"data-dojo-type" : "dijit/form/TextBox"});
});
</script>
Attachments (1)
Note: See
TracTickets for help on using
tickets.
It turns out that data-dojo-type doesn't work in the mixin parameter; you need to use the old dojoType:
Also, you need to preload dijit/form/TextBox, as the lazy loading doesn't work with the instantiate() method.