You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/PIE_ELEMENT_CONTRACT.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,23 @@ When a helper is exported, its name and behavior are public API. Do not rename o
35
35
36
36
### Custom Element Runtime
37
37
38
-
Published element view modules export custom element classes. They must not register tags at package import time. Runtime registration belongs to the player or host.
38
+
Published element view modules export custom element classes. They must not
39
+
register their authored top-level PIE tag at package import time. Runtime
40
+
registration of authored item tags belongs to the player or host.
41
+
42
+
If a package renders private child custom elements inside its own implementation,
43
+
the package's browser artifact must define those private child tags itself before
44
+
the first render depends on them. Private child tags are not authored content
45
+
dependencies and players must not discover them from package dependencies, DOM
46
+
snippets, or element-specific knowledge.
47
+
48
+
Private child tag names are global custom element names, so packages must scope
49
+
them by the owning package version (for example with a `--version-<encoded>`
50
+
suffix), use the same scoped name for registration and rendering, and keep
51
+
registration idempotent with `customElements.get(...)` guards. This preserves
52
+
side-by-side loading of multiple package versions and mirrors the IIFE behavior
53
+
where private child implementations are resolved from the owning package's
0 commit comments