Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: policy for well formed DOM #14

Open
Jamesernator opened this issue Sep 10, 2018 · 1 comment
Open

Feature Request: policy for well formed DOM #14

Jamesernator opened this issue Sep 10, 2018 · 1 comment

Comments

@Jamesernator
Copy link

Currently DOM permits a lot of trees that couldn't be represented in HTML or are semantically invalid.

For example this tree couldn't be represented in HTML but can be constructed in DOM anyway:

p
  "Some text"
  p "Another paragraph nested inside"
  "More text"

Another example is this tree that can be represented in HTML but could break accessibility:

p "Some text"
li "An out of place list item"
p "Some more text"

I propose a feature policy well-formed-dom that fails to construct DOM if it would break the content model specified by HTML.

@annevk
Copy link

annevk commented Nov 14, 2018

FWIW, while I appreciate the sentiment, I don't think this is doable. This would add massive complexity and doesn't really buy us much. It would mostly lead to slower code.

@clelland clelland transferred this issue from w3c/webappsec-permissions-policy Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants