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

Upstreaming Shadow DOM and outstanding v1 work #661

Closed
7 of 14 tasks
annevk opened this issue Sep 5, 2017 · 10 comments
Closed
7 of 14 tasks

Upstreaming Shadow DOM and outstanding v1 work #661

annevk opened this issue Sep 5, 2017 · 10 comments

Comments

@annevk
Copy link
Collaborator

annevk commented Sep 5, 2017

Previously: #377, #495.

Outstanding issues in DOM and HTML:

Outstanding issues in this repository:

@annevk
Copy link
Collaborator Author

annevk commented Sep 5, 2017

The main thing lacking in OP is information about corresponding CSS efforts. There's https://drafts.csswg.org/css-scoping/ and https://github.com/w3c/csswg-drafts/labels/css-scoping-1 at least, but maybe there's more?

@snuggs
Copy link

snuggs commented Sep 7, 2017

@annevk perhaps update description. Missing a # 1.

The main thing lacking in OP is information about corresponding CSS efforts. There's https://drafts.csswg.org/css-scoping/ and https://github.com/w3c/csswg-drafts/labels/css-scoping-1 at least, but maybe there's more?

What is the status with the pseudo class :defined? Seemed to be lacking in certain vendors but also could be merely a reflection of their respective overall status of Custom Elements which of course is outside the scope of this issue.

@annevk
Copy link
Collaborator Author

annevk commented Sep 7, 2017

The numbers correspond to the sections in https://w3c.github.io/webcomponents/spec/shadow/.

@annevk
Copy link
Collaborator Author

annevk commented Sep 7, 2017

:defined is now #665, though note it's not related to shadow trees.

@snuggs
Copy link

snuggs commented Sep 7, 2017

Ah yes i see now after re-assessing the steps section @annevk 🙏 Thanks for the clarification.

@Haprog
Copy link

Haprog commented Dec 13, 2021

The Shadow DOM spec used to declare that DocumentOrShadowRoot is extended with elementFromPoint and elementsFromPoint. Here's the latest web archive snapshot that still says so: https://web.archive.org/web/20180228173001/http://www.w3.org/TR/shadow-dom/

It seems that was since changed to a short page that basically just says:

Shadow DOM specification is being incorporated into to the DOM specification, HTML specification, CSS Scoping Module Level 1, UI Events specification, and other relevant specifications.

I guess that was related to this issue? But I'm also very confused by where did that definition go.

The only current spec mentioning elementFromPoint and elementsFromPoint that I could find now is the CSSOM View Module draft that specifies them on the Document only.

Related: w3c/csswg-drafts#5886
See also: https://caniuse.com/mdn-api_documentorshadowroot_elementfrompoint

@Haprog
Copy link

Haprog commented Dec 13, 2021

So it kind of looks like elementFromPoint and elementsFromPoint were being dropped from the spec for DocumentOrShadowRoot since they were defined in Shadow DOM spec for that but there's no live spec reference for it anymore but I'm pretty sure this is not intentional.

This confusion also seems to have caused TypeScript to drop those methods from their DOM type definitions in TS 4.4 but looks like were added back in TS 4.5.

TypeScript 4.4 libdom changes (microsoft/TypeScript-DOM-lib-generator#1029)

DocumentOrShadowRoot
Removed: caretPositionFromPoint, caretRangeFromPoint, elementFromPoint, elementsFromPoint, getSelection

TypeScript 4.5 libdom changes (microsoft/TypeScript-DOM-lib-generator#1143)

DocumentOrShadowRoot
Added: elementFromPoint, elementsFromPoint

@annevk
Copy link
Collaborator Author

annevk commented Dec 13, 2021

They need to be defined in CSSOM. That hasn't happened yet, but as you found there's an issue tracking it.

@iameduardod
Copy link

Hi @annevk , any ETA when Shadow DOM / Roots will be included in web standards by W3C?

@annevk
Copy link
Collaborator Author

annevk commented Apr 19, 2022

Already happened: https://dom.spec.whatwg.org/review-drafts/2020-06/.

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

No branches or pull requests

6 participants