Repository navigation
Conversation
|
Review of #1346 (declarative shadow root flattening in The approach is sound: it is gated by a cheap regex, bounded in rounds and templates, only touches
The CHANGELOG entry and the docs section look good. |
…ols #922 Signed-off-by: Nik Cubrilovic <[email protected]>
… fallback, charge only inlined roots #922 Signed-off-by: Nik Cubrilovic <[email protected]>
9ecc231 to
325a9c5
Compare
|
Review of the declarative shadow DOM flattening in
Missing from the PR: the CHANGELOG and docs are in place, but there is no check that the |
…light style/script children no longer replace slot fallback #922 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff only. I did not run the tests.
The design is sound overall. It follows browser semantics (first template only, restricted host list, slot fallback), it is bounded, and the tests cover the main cases. |
|
Landed in v0.0.144 as nik |
Closes #922
linkedom keeps the content of
<template shadowrootmode>inside the template's inertcontentfragment, soquerySelectorAllnever reached controls a browser renders inside a declarative shadow root.parseHTML(the single parser entry) now places that content where the template was, only when the HTML mentionsshadowroot(one regex test otherwise). Browser rules kept: first shadow template of a host only, only elements that can host a shadow root (a hyphenated custom element or the standard list), plain<template>untouched, nested roots handled (bounded: 16 rounds, 5000 templates).Tests:
packages/rules/tests/declarative-shadow-root-922.test.ts: unnamed button in open and closed roots fails like the light DOM, plain template inert, named button passes, links/images/headings and nested roots reachable, first-template-only, table host inert, 20,000-template page bounded.Docs: new "Content inside shadow roots" section in
docs/rules/index.mdx; CHANGELOG under Unreleased. Skill: none.