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

Support for Shadow DOM #191

Open
schmitch opened this issue Dec 22, 2015 · 4 comments
Open

Support for Shadow DOM #191

schmitch opened this issue Dec 22, 2015 · 4 comments

Comments

@schmitch
Copy link

Hello, it would be great if Scala JS would also have a Shadow DOM implementation, i.e. provide a way to access Shadow DOM's.

Currently the Spec is in Draft:
https://w3c.github.io/webcomponents/spec/shadow/#widl-Element-attachShadow-ShadowRoot-ShadowRootInit-shadowRootInitDict

However there are already really great polyfills here:
http://webcomponents.org/polyfills/shadow-dom/

@mseddon
Copy link
Contributor

mseddon commented Dec 23, 2015

Definitely a sound addition!

If anyone wants to contribute this a few thoughts:

  • It should probably live in org.scalajs.dom.experimental.shadowdom
  • There would be a package object for shadowdom defining implicit coercions from Element onto a trait exposing shadowRoot, attachShadow etc. members.
  • Since the API is experimental and likely to change in future, a comment at the top of the file linking the version of the specification implemented and a note with it's release date (currently 15th December) will aid tracking support longer term.

@mseddon
Copy link
Contributor

mseddon commented Feb 16, 2016

ShadowDOM has a dependency on https://www.w3.org/TR/cssom-view/, which we currently do not implement.

@unarist
Copy link
Contributor

unarist commented Nov 23, 2020

Now, core parts of the ShadowDOM are in the DOM Standard.
WICG/webcomponents#661

Also now can we have this as a non-experimental API?
https://caniuse.com/shadowdomv1

@armanbilge
Copy link
Member

@unarist if you're up for it will consider a PR! :)

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

4 participants