Skip to content

CDATA section can be imported into HTML document #1420

@meiqinyan

Description

@meiqinyan

What is the issue with the DOM Standard?

Document.importNode() can be called with a CDATA section node as the first argument, in effect allowing for a CDATA section to belong to a HTML document. Given that .createCDATASection() for HTML throws an exception, the intent appears to be that this is not supposed to be possible.

While this situation is somewhat bizarre, as far as I can tell there are not any inconsistencies that actually result from this. Maybe changing .createCDATASection() to behave the same in HTML as XML would be less surprising?

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposalNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions