dojo parser's stopParser

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

dojo parser's stopParser

Michael Schall
Is there a way to stop dojo's parser from "looking inside" a dom structure?  it seems that stopParser would be the tool to do that, but it does not work in all cases.  What is stopParser's purpose if this is "by design".

I have a plunkr created that shows my issue:

Button 1 is correctly parsed and turned into a dijit button, but I need a way to have Button 2 ignored similar to the "broken on purpose" Button 3.  In my app, the I want to use this concept for custom templates instead of having the templates in a separate files.

I can resolve the issue by modifying parser.js and adding another check that continues on any node with stopParser present...

          if (node.nodeType != 1) { // Text or comment node, skip to next sibling node = node.nextSibling; continue; }
// new code if (node.getAttribute("stopParser") == "true") { node = node.nextSibling; continue; }

Thanks for your time.


Dojo Toolkit:

[hidden email]
To unsubscribe, visit: