Opened 7 years ago
Last modified 5 years ago
#18549 new defect
stopParser not working in templated widgets
Reported by: | MarkoV | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.14 |
Component: | Parser | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The parser does not honour stopParser:true in a custom widget with WidgetsInTemplateMixin?. It still tries to parse the widget again leading to the "but that id is already registered" error.
example:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <script type="text/javascript" > var dojoConfig={ async: true, parseOnLoad: true, isDebug: true, locale: 'en-gb', aliases: [["text", "dojo/text"]], packages: [{ location: location.pathname.replace(/\/[^/]+$/, "") +"../mymodule", name: "test" }] } </script> <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script> <script type="text/javascript" > require([ 'test/mod', 'dojo/domReady!' ], function(mod) { var mg = new mod({},"mod") mg.startup() }); </script> </head> <body> <div id="mod"></div> </body> </html>
define([ 'dijit/_WidgetBase', 'dijit/_WidgetsInTemplateMixin', 'dijit/layout/LayoutContainer', 'dijit/_TemplatedMixin', 'dojo/_base/declare' ], function(WidgetBase, WidgetsInTemplateMixin, LayoutContainer,_TemplatedMixin, declare) { return declare([ WidgetBase,_TemplatedMixin,WidgetsInTemplateMixin], { templateString:"<div> <div data-dojo-type='dijit/layout/LayoutContainer' data-dojo-attach-point='header' ></div> </div> ", stopParser:true, startup: function() { } }); });
Attachments (1)
Change History (3)
Changed 7 years ago by
comment:1 Changed 7 years ago by
Milestone: | tbd → 1.12 |
---|
comment:2 Changed 5 years ago by
Milestone: | 1.13 → 1.14 |
---|
Note: See
TracTickets for help on using
tickets.
Example code