Repository navigation
[labs/ssr] Implement ShadowRoot and document/window in event path - #4893
Conversation
🦋 Changeset detectedLatest commit: 8b22fd6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@sorvell In the initial SSR events PR you asked for a tree representation for the event path; I tried to add this here: https://github.com/lit/lit/blob/f4d202c8e1391459a67a43a927f1e015b4bc21e2/packages/labs/ssr-dom-shim/src/lib/events.ts |
I think it should be, in case someone is doing path manipulation by index, and assuming that window is there. We do have a window object, we just don't put |
c6e6278 to
20d1e4d
Compare
20d1e4d to
ecf28ca
Compare
ecf28ca to
3a2be96
Compare
3a2be96 to
d09a47a
Compare
8d1c66a to
8b22fd6
Compare
…t#4893) This implements ShadowRoot and document/window in the event path. For this to work, `Node.getRootNode()` was implemented as part of the DOM shim, which allows to retrieve the host (if the element is in a Shadow DOM) or document. Due to this, Document and document were moved into the `@lit-labs/ssr-dom-shim` from the `@lit-labs/ssr` (relates to lit#4882). This also fixes lit#5178, by not short circuiting on slots with duplicate names.
This PR implements ShadowRoot and document/window in the event path.
For this to work,
Node.getRootNode()was implemented as part of the DOM shim, which allows to retrieve the host (if the element is in a Shadow DOM) or document. Due to this, Document and document were moved into the@lit-labs/ssr-dom-shimfrom the@lit-labs/ssr(relates to #4882).This also fixes #5178, by not short circuiting on slots with duplicate names.