Skip to content

JS/DOM: Web Components baseline — customElements and Shadow DOM #338

Description

@mplsllc

Status

MacSurf's modern DOM/QuickJS work now covers the core mutation/event/network APIs needed by many SPAs, but Web Components remain outside the implemented surface and were only listed historically as out-of-scope in the old SPA umbrella #157.

This issue makes that remaining modern DOM gap explicit.

V1 scope

Separate the two major pieces and implement only when real-page evidence justifies them:

Custom Elements

  • window.customElements
  • customElements.define/get/whenDefined
  • upgrade newly-created/parsed matching elements
  • constructor and basic connected/disconnected lifecycle callbacks

Shadow DOM

  • element.attachShadow({mode})
  • shadowRoot
  • basic shadow-tree DOM ownership/traversal
  • rendering/style boundary sufficient for a controlled component

Advanced slotting, adoptedStyleSheets, form-associated custom elements, declarative shadow DOM, and full composed-event retargeting can be later rounds.

Acceptance

A controlled custom element can register, upgrade, attach a shadow root, render shadow content, and survive DOM insertion/removal on the G3 with correct wrapper/lifetime behavior.

Keep this lower priority than core selector/layout compatibility unless a real target page makes it blocking.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: js-engineDuktape, ES5 evaluator, JS bindingsenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions