File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -73683,6 +73683,20 @@ console.log(plasticButton.outerHTML); // will output '<button is="plastic-but
73683
73683
console.assert(outOfDocument instanceof ExampleElement);
73684
73684
</script></code></pre>
73685
73685
73686
+ <h5>Scoped custom element registries</h5>
73687
+
73688
+ <p>To allow multiple libraries to co-exist without explicit coordination,
73689
+ <code>CustomElementRegistry</code> can be used in a scoped fashion as well.</p>
73690
+
73691
+ <pre><code class="javascript">const scoped = new CustomElementRegistry();
73692
+ scoped.define("example-element", ExampleElement);
73693
+
73694
+ const element = document.createElement("example-element", { customElementRegistry: scoped });</code></pre>
73695
+
73696
+ <p>A node with an associated scoped <code>CustomElementRegistry</code> will use that registry for
73697
+ all its operations, such as when invoking <code
73698
+ data-x="dom-Element-setHTMLUnsafe">setHTMLUnsafe()</code>.</p>
73699
+
73686
73700
<h5>Exposing custom element states</h5>
73687
73701
73688
73702
<p>Built-in elements provided by user agents have certain states that can change over time
You can’t perform that action at this time.
0 commit comments