[dojo-contributors] stripped id tags

Bill Keese bill at dojotoolkit.org
Sat Apr 8 10:55:32 EDT 2006


The widget instantiation code strips out any id tags in the template,
making templates like this impossible:

<div id="${this.widgetId}">....</div>

The culprit is this code from DomWidget.js:

// strip IDs to prevent dupes. removeAttribute() doesnt care if
attribute doesnt exist
baseNode.removeAttribute('id');

This must be referring to the source domnode vs. the target domnode, but
the code seems to do more harm than good, since in the typical case the
source domnode gets dropped anyway.

Any objections if I remove that line?

-- 

Bill



More information about the dojo-contributors mailing list