Opened 10 years ago

Closed 10 years ago

#10031 closed defect (wontfix)

NodeList.wrap() accepts invalid html

Reported by: Les Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

NodeList?.wrap() breaks the DOM when invalid html is passed. SyntaxError? should result.

http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/NodeList-manipulate.html

Try:

dojo.query('textarea').wrap('div/>');

Change History (1)

comment:1 Changed 10 years ago by James Burke

Resolution: wontfix
Status: newclosed

I prefer not to put validating code for HTML in, it will make the methods slower, and the browsers I tested, IE8, FF3 and Safari 4 all throw an error in the console with that line. I think that is good enough of a warning.

Note: See TracTickets for help on using tickets.