Opened 9 years ago

Closed 9 years ago

#17414 closed defect (wontfix)

parser.instantiate - no result

Reported by: [email protected] Owned by:
Priority: undecided Milestone: tbd
Component: Parser Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:


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>


require(["dojo/parser", "dojo/dom"], function(parser, dom) {

parser.instantiate([dom.byId("myDiv")], {"data-dojo-type" : "dijit/form/TextBox"});



Attachments (1)

parser.html (330 bytes) - added by bill 9 years ago.
working test case

Download all attachments as: .zip

Change History (2)

comment:1 Changed 9 years ago by bill

Resolution: wontfix
Status: newclosed

It turns out that data-dojo-type doesn't work in the mixin parameter; you need to use the old dojoType:

parser.instantiate([dom.byId("myDiv")], {"dojoType" : "dijit/form/TextBox"});

Also, you need to preload dijit/form/TextBox, as the lazy loading doesn't work with the instantiate() method.

Changed 9 years ago by bill

Attachment: parser.html added

working test case

Note: See TracTickets for help on using tickets.