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

Lack of [[PlatformBrand]] is biting us #597

Closed
annevk opened this issue Mar 13, 2018 · 6 comments
Closed

Lack of [[PlatformBrand]] is biting us #597

annevk opened this issue Mar 13, 2018 · 6 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 13, 2018

Consider https://dom.spec.whatwg.org/#concept-node-ensure-pre-insertion-validity. Step 4 bans DocumentFragment. Does it ban ShadowRoot? If it does, that's fine, but also a problem, since it shouldn't ban CDATASection.

I thought we had an issue tracking this, but it seems like we don't.

This is somewhat related to #457, which is about updating various algorithms to account for Attr nodes, which can now be passed to them again (and not all are anticipating that).

@annevk
Copy link
Member Author

annevk commented Mar 13, 2018

([[PlatformBrand]] is whatwg/webidl#97 by the way, which would give us a way more accurate way of describing what "instance is an interface" actually means.)

@dwimmer90

This comment has been minimized.

@annevk

This comment has been minimized.

@annevk
Copy link
Member Author

annevk commented Mar 15, 2018

I guess just like "exclusive Text node" we should have "exclusive DocumentFragment node" for now and use that. And add some tests.

@annevk
Copy link
Member Author

annevk commented Mar 15, 2018

Maybe this is not a problem. It seems Chrome and Safari happily treat a ShadowRoot as a DocumentFragment and don't really branch on it when appending. Probably still worth going through all the places, but this might be all mostly fine. (Would be good to check test coverage though.)

<!DOCTYPE html>
...<script>
x = document.createElement("div");
s = x.attachShadow({mode: "closed"});
is = s.appendChild(document.createElement("blah"));
document.body.appendChild(s);
</script>

@annevk
Copy link
Member Author

annevk commented Aug 3, 2021

I started looking into this to see if I could solve whatwg/webidl#659 (and also #636 and #719) and unfortunately it's not super straightforward.

  1. I noticed that many instances of the term "node" reference the wrong definition. I have a patch for this (lacking for=/).
  2. I noticed that we talk about Attr nodes, despite Attr not being defined as a node.
  3. If we go to the language of implements X, it doesn't really make sense anymore to distinguish between "abstract" interfaces and "concrete" ones. Or does it?

I'll upload a PR that takes a stab at this for further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants
@annevk @dwimmer90 and others