#1361 Implement Google WebComponents

Open
opened 1 year ago by mattatobin · 7 comments
mattatobin commented 1 year ago (Migrated from github.com)

https://developer.mozilla.org/en-US/docs/Web/Web_Components

- [ ] Custom Elements v1 - [ ] Shadow DOM v1 - [x] HTML Templates - [x] ES Modules ---- https://developer.mozilla.org/en-US/docs/Web/Web_Components
wolfbeast commented 1 year ago (Migrated from github.com)
Owner

It is now late May -- I have to know what kind of timeline we’re looking at here to decide on how to do releases in the summer. If things are expected to take considerably more time then maybe we need to push WebComponents back to the next milestone and make a redwood-based v29 a thing. I don’t want to be hanging on a .9 for a long time, that gives the wrong signals to our users.

@g4jc realistically speaking, what are you looking at in terms of what has been done and what still needs doing to get a basic implementation of WebComponents into UXP? How close are we?

It is now late May -- I have to know what kind of timeline we're looking at here to decide on how to do releases in the summer. If things are expected to take considerably more time then maybe we need to push WebComponents back to the next milestone and make a redwood-based v29 a thing. I don't want to be hanging on a .9 for a long time, that gives the wrong signals to our users. @g4jc realistically speaking, what are you looking at in terms of what has been done and what still needs doing to get a basic implementation of WebComponents into UXP? How close are we?
g4jc commented 1 year ago (Migrated from github.com)
Owner

To get minimum working functionality (ignoring devtools work and just getting rendering working), we still need:

Shadow DOM v1

Based on the list, I feel we’re close, but I could certainly use some/any help porting the remaining bugs, and some will not be portable (esp. any code working with CSS).

To get minimum working functionality (ignoring devtools work and just getting rendering working), we still need: [Shadow DOM v1](https://github.com/MoonchildProductions/UXP/issues/1375#issuecomment-643646975) Based on the list, I feel we're close, but I could certainly use some/any help porting the remaining bugs, and some will not be portable (esp. any code working with CSS).
mattatobin commented 1 year ago (Migrated from github.com)
Owner

Will that get Polymer v2 functioning? Eg YouTube.

Remember we also need Custom Elements and ES Modules to work with Polymer v2 as well.

Will that get Polymer v2 functioning? Eg YouTube. Remember we also need Custom Elements and ES Modules to work with Polymer v2 as well.
wolfbeast commented 1 year ago (Migrated from github.com)
Owner

Shadow DOM v1 {list}

Maybe close to getting ShadowDOM in but as stated (and also the opening post here) there are more parts to this than just ShadowDOM, so how close are we to ticking those 4 boxes? Is that something for June/July, or something for October (or later)?

> Shadow DOM v1 {list} Maybe close to getting ShadowDOM in but as stated (and also the opening post here) there are more parts to this than just ShadowDOM, so how close are we to ticking those 4 boxes? Is that something for June/July, or something for October (or later)?
g4jc commented 1 year ago (Migrated from github.com)
Owner

Here’s a roadmap/overview of what’s been done and where we still need to go to get this working from the DOM and CSS side. Can’t speak for the ES Modules as I never worked on them, but we already have some basic functionality that was done long prior to this issue.

Custom Elements #1344

CustomElementRegistry.define()
Should already be fully implemented, as it was done by our original fork point.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define
Note: Autonomous custom element example does not appear to be working

CustomElementRegistry.get()
Definitely implemented long before fork point
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get

CustomElementRegistry.upgrade()
Already implemented and updated to v1 Spec.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade

CustomElementRegistry.whenDefined()
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined

HTML

<template>
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template

<slot>
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot

Methods:
Note: So far unable to confirm methods are working via tests.

HTMLSlotElement.assignedNodes()
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes

HTMLSlotElement.assignedElements()
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements

HTMLSlotElement: slotchange event
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event

Elements

Element.attachShadow()
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow

Element.shadowRoot()
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot

Element.part() - FF71+
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Element/part
https://bugzilla.mozilla.org/show_bug.cgi?id=1505489 (Servo + XBL removal dependant)

Node
Node.isConnected()
Already Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected

Node.getRootNode()
Implemented via #1585
https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode

Event

Event.composed
Already implemented
https://developer.mozilla.org/en-US/docs/Web/API/Event/composed

Event.composedPath
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
Note: Unable to confirm via reftest that this is working.

Slotable.assignedSlot
Implemented
https://developer.mozilla.org/en-US/docs/Web/API/Slotable/assignedSlot
Note: Unable to confirm via reftest that this is working.

CSS
:defined
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/CSS/:defined

:host()
--Not Implemented. See #1593
https://developer.mozilla.org/en-US/docs/Web/CSS/:host()

::slotted()
--Not implemented. See #1592
https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted

::part
--Not Implemented.
https://developer.mozilla.org/en-US/docs/Web/CSS/::part

-webkit pseudo-element selectors
--Not Implemented.
https://bugzilla.mozilla.org/show_bug.cgi?id=1424106

Removal of :unresolved pseudo class
--Not Implemented.
https://bugzilla.mozilla.org/show_bug.cgi?id=1417829

DocumentOrShadowRoot
Basic implementation functional after split. See 43725c7264 and bbd59105da.

DocumentOrShadowRoot.activeElement
Implemented.
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/activeElement

--Not Implemented:
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/getSelection
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/pointerLockElement
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/styleSheets

Here's a roadmap/overview of what's been done and where we still need to go to get this working from the DOM and CSS side. Can't speak for the ES Modules as I never worked on them, but we already have some basic functionality that was done long prior to this issue. **Custom Elements** #1344 CustomElementRegistry.define() Should already be fully implemented, as it was done by our original fork point. https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define Note: Autonomous custom element example does not appear to be working CustomElementRegistry.get() Definitely implemented long before fork point https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get CustomElementRegistry.upgrade() Already implemented and [updated to v1 Spec.](https://github.com/MoonchildProductions/UXP/commit/515c46e695f6cf0a66273e4744330ad7d23fe2cc) https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade CustomElementRegistry.whenDefined() Already Implemented. https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined **HTML** `<template>` Already Implemented. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template `<slot>` Already Implemented. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot **Methods:** Note: So far unable to confirm methods are working via tests. HTMLSlotElement.assignedNodes() [Implemented](https://github.com/MoonchildProductions/UXP/commit/e31ed5b07466d4a579fe4b025f97c971003fbc3f) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes HTMLSlotElement.assignedElements() [Implemented](https://github.com/MoonchildProductions/UXP/commit/222d316c835019ce64603180e4a73b231b788d76) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements HTMLSlotElement: slotchange event [Implemented](https://github.com/MoonchildProductions/UXP/commit/3508e79b1fe7fc928eed2f3c7bf2d628c53fbf17) https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/slotchange_event **Elements** Element.attachShadow() [Implemented.](https://github.com/MoonchildProductions/UXP/commit/873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806) https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow Element.shadowRoot() [Implemented.](https://github.com/MoonchildProductions/UXP/commit/3a74795a56e92313c1b33a54500917794ba09b72) https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot Element.part() - FF71+ --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/API/Element/part https://bugzilla.mozilla.org/show_bug.cgi?id=1505489 (Servo + XBL removal dependant) **Node** Node.isConnected() Already Implemented. https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected Node.getRootNode() [Implemented](https://github.com/MoonchildProductions/UXP/commit/8797b20746cd80c51cc56225f70ddea6c6b94f9d) via #1585 https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode **Event** Event.composed Already implemented https://developer.mozilla.org/en-US/docs/Web/API/Event/composed Event.composedPath [Implemented.](https://github.com/MoonchildProductions/UXP/commit/7e506bd98dab604062bfe12a44c096eb287721bf) https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath Note: Unable to confirm via reftest that this is working. Slotable.assignedSlot [Implemented](https://github.com/MoonchildProductions/UXP/commit/3a74795a56e92313c1b33a54500917794ba09b72) https://developer.mozilla.org/en-US/docs/Web/API/Slotable/assignedSlot Note: Unable to confirm via reftest that this is working. **CSS** :defined --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/CSS/:defined :host() --Not Implemented. See #1593 https://developer.mozilla.org/en-US/docs/Web/CSS/:host() ::slotted() --Not implemented. See #1592 https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted ::part --Not Implemented. https://developer.mozilla.org/en-US/docs/Web/CSS/::part -webkit pseudo-element selectors --Not Implemented. https://bugzilla.mozilla.org/show_bug.cgi?id=1424106 Removal of :unresolved pseudo class --Not Implemented. https://bugzilla.mozilla.org/show_bug.cgi?id=1417829 **DocumentOrShadowRoot** Basic implementation functional after split. See https://github.com/MoonchildProductions/UXP/commit/43725c7264ca3f63de348d1d1596ce1fe9e64d2d and https://github.com/MoonchildProductions/UXP/commit/bbd59105da97200947ae62b2dc949a1130a40d75. DocumentOrShadowRoot.activeElement [Implemented](https://github.com/MoonchildProductions/UXP/pull/1591). https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/activeElement --Not Implemented: https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementsFromPoint https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/getSelection https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/pointerLockElement https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/styleSheets
wolfbeast commented 10 months ago (Migrated from github.com)
Owner

Signing off on ES modules. That part should now be complete.

Signing off on ES modules. That part should now be complete.
g4jc commented 10 months ago (Migrated from github.com)
Owner

Great news! That just leave us with CSS, Element.part, additional DocumentOrShadowRoot elements, and flipping the W3C Pointer events pref (#1630). CSS is the full stop road blocker at the moment, and my attempts to get any communication from people that wrote the code have fell fallen flat.

Great news! That just leave us with CSS, Element.part, additional DocumentOrShadowRoot elements, and flipping the W3C Pointer events pref (#1630). CSS is the full stop road blocker at the moment, and my attempts to get any communication from people that wrote the code have ~~fell~~ fallen flat.
Moonchild added the
Bounty
label 6 months ago
Moonchild removed the
Bounty
label 6 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.