Skip to content

Commit 7a42547

Browse files
[HTML] Add an introduction for scoped custom element registries whatwg/html@307f1ad
1 parent 287cdd9 commit 7a42547

1 file changed

Lines changed: 38 additions & 7 deletions

File tree

HTML-custom-ja.html

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@
172172

173173
●●options
174174

175-
spec_date:2025-07-24
176-
trans_update:2025-07-25
175+
spec_date:2025-07-29
176+
trans_update:2025-07-30
177177
source_checked:250314
178178
page_state_key:HTML
179179
spec_status:LS
@@ -339,6 +339,7 @@
339339
保存-:save:~
340340
予備の:backup::~
341341
内部特能:internals::~
342+
視野~付き:scoped
342343

343344
●form提出
344345
無毒化:sanitization::~
@@ -422,6 +423,8 @@
422423
地点:points:~
423424
排他的:exclusive:~
424425
理屈:reasoning:~
426+
協調:coordination:~
427+
共存-:co-exist:~
425428

426429
作者に公開される:author-exposed
427430
予期されない:unexpected
@@ -646,11 +649,12 @@
646649

647650
m.attachInternals:#dom-attachinternals
648651
m.attachShadow:~DOM4#dom-element-attachshadow
652+
653+
~HTMLdynamic#dom-document-open
654+
~HTMLdynamic#dom-document-write
649655
~DOM4#dom-parentnode-movebefore
650656
~HEforms#dom-form-elements
651-
652-
m.document.open:~HTMLdynamic#dom-document-open
653-
m.document.write:~HTMLdynamic#dom-document-write
657+
~HTMLdynamic#dom-element-sethtmlunsafe
654658

655659
mb.extends:#dom-elementdefinitionoptions-extends
656660

@@ -1921,9 +1925,35 @@ <h5 title="Upgrading elements after their creation">4.13.1.6. 要素の作成~
19211925
&lt;/script&gt;
19221926
</pre>
19231927

1928+
</section>
1929+
<section id="scoped-custom-element-registries">
1930+
<h5 title="Scoped custom element registries">4.13.1.7 視野~付きな~custom要素~registry</h5>
1931+
1932+
<p>
1933+
複数の~libraryが明示的な協調を伴わずに共存することを許容するため、
1934+
`CustomElementRegistry$I は,`視野~付き@#is-scoped$な流儀でも利用できる。
1935+
1936+
To allow multiple libraries to co-exist without explicit coordination, CustomElementRegistry can be used in a scoped fashion as well.
1937+
</p>
1938+
1939+
<pre class="lang-js">
1940+
const %scoped = new CustomElementRegistry();
1941+
%scoped.define("example-element", ExampleElement);
1942+
1943+
const %element = document.createElement("example-element", { customElementRegistry: %scoped });
1944+
</pre>
1945+
1946+
<p>
1947+
視野~付きな `CustomElementRegistry$I %scoped が結付けられた~node %element は、
1948+
%element に対する どの演算にも %scoped を利用することになる
1949+
— `setHTMLUnsafe()@~HTMLdynamic#dom-element-sethtmlunsafe$c を呼出すときなど。
1950+
1951+
A node with an associated scoped CustomElementRegistry will use that registry for all its operations, such as when invoking setHTMLUnsafe().
1952+
</p>
1953+
19241954
</section>
19251955
<section id="exposing-custom-element-states">
1926-
<h5 title="Exposing custom element states">4.13.1.7. ~custom要素~状態の公開-法</h5>
1956+
<h5 title="Exposing custom element states">4.13.1.8. ~custom要素~状態の公開-法</h5>
19271957

19281958
<p>
19291959
~UAにより供される組込みの要素には、[
@@ -2013,7 +2043,8 @@ <h4 title="Requirements for custom element constructors and reactions">4.13.2. ~
20132043
</li>
20142044
<li>
20152045
構築子は、[
2016-
`document.write()$m / `document.open()$m
2046+
`document.write()@~HTMLdynamic#dom-document-write$c /
2047+
`document.open()@~HTMLdynamic#dom-document-open$c
20172048
]~methodを利用してはナラナイ。
20182049
20192050
The constructor must not use the document.write() or document.open() methods.

0 commit comments

Comments
 (0)