A way for createAttribute() to bypass XML Name validation in HTML documents #769
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
createAttribute(localName)
and other attribute creating methods (setAttribute
and such) require attribute name to be a valid XML Name, and throw otherwise.However, the HTML parser is less restrictive in attribute names, allowing HTML documents to have some attribute names that are illegal in XML.
Whenever it is needed to programmatically create an attribute with a name that is allowed in HTML but illegal in XML, this is possible through the parser, but not with DOM attribute creating methods, it seems.
Could
createAttribute
(and maybesetAttribute
and friends) be somehow allowed to create such attributes in HTML documents?The text was updated successfully, but these errors were encountered: