-
Notifications
You must be signed in to change notification settings - Fork 81
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
Etch-a-sketch theme #454
base: main
Are you sure you want to change the base?
Etch-a-sketch theme #454
Conversation
Save point Save point Save point Save point
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
if (mediaControllerId) { | ||
const mediaControllerEl = document.getElementById(mediaControllerId); | ||
mediaControllerEl?.associateElement?.(this); | ||
const rootNode = this.getRootNode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to remember if there's any specific downsides to getRootNode. The TS parser at least doesn't like it when trying to use properties on it, so it needs to be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need to replace document.getElementById with this.getRootNode().getElementById for themes to work nicely with a decoupled media controller
Pretty simple implementation.
+Had to fix the media-controller attribute in chrome-button so it can work inside a shadow dom. Should be applied (in a followup) to other components.
Goals for a more advanced one (later PRs):