Skip to content

Commit 8605e1b

Browse files
[HTML] Make initialize() upgrade and fix upgrade() whatwg/html@003549c
1 parent 7151db8 commit 8605e1b

File tree

1 file changed

+49
-40
lines changed

1 file changed

+49
-40
lines changed

HTML-custom-ja.html

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

173173
●●options
174174

175-
spec_date:2025-07-30
176-
trans_update:2025-07-30
175+
spec_date:2025-11-21
176+
trans_update:2025-11-22
177177
source_checked:250314
178178
page_state_key:HTML
179179
spec_status:LS
@@ -299,7 +299,6 @@
299299
%昇格~候補~:upgradeCandidates
300300
%要素:element
301301
%~map:-
302-
%候補~:candidates
303302
%候補:candidate
304303
%属性:attribute
305304
%C:C
@@ -422,7 +421,7 @@
422421
責務:responsibility:~
423422
地点:points:~
424423
排他的:exclusive:~
425-
理屈:reasoning:~
424+
理由付け:reasoning:~
426425
協調:coordination:~
427426
共存-:co-exist:~
428427

@@ -896,6 +895,7 @@
896895
~promiseを解決する:~WEBIDLjs#resolve
897896
属する~realm:~WEBIDLjs#dfn-associated-realm
898897

898+
~tree順序:~DOM4#concept-tree-order
899899
~node:~DOM4#concept-node
900900
要素:~DOM4#concept-element
901901
el.~custom:~DOM4#concept-element-custom
@@ -3898,37 +3898,33 @@ <h4 title="The CustomElementRegistry interface">4.13.4. `CustomElementRegistry^I
38983898
</div>
38993899

39003900
<div class="algo">
3901-
<p>
39023901
`upgrade(root)@m
3903-
~method手続きは:
3904-
3905-
The upgrade(root) method steps are:
3906-
</p>
3907-
<ol>
3908-
<li>
3909-
%候補~群 ~LET %root の`~shadowも含めた広義-子孫$である要素たち成す,
3910-
`~shadowも含めた~tree順序$による`~list$
3911-
3912-
Let candidates be a list of all of root's shadow-including inclusive descendant elements, in shadow-including tree order.
3913-
</li>
3914-
<li>
3915-
%候補~群 を成す
3902+
~method手続きは
3903+
3904+
%root の`~shadowも含めた広義-子孫$たちを成す
39163905
~EACH( %候補 )
3917-
に対し
3906+
に対し,`~shadowも含めた~tree順序$で
3907+
3908+
~IF[
3909+
%候補 は`要素$である
3910+
]~AND[
3911+
%候補 の`~custom要素~registry$el ~EQ コレ
3912+
39183913
39193914
`要素を昇格するよう試行する$( %候補 )
39203915
3921-
For each candidate of candidates, try to upgrade candidate.
3922-
</li>
3923-
</ol>
3916+
The upgrade(root) method steps are:
3917+
• For each shadow-including inclusive descendant candidate of root, in shadow-including tree order:
3918+
•• If candidate is not an Element node, then continue.
3919+
•• If candidate's custom element registry is not this, then continue.
3920+
•• Try to upgrade candidate.
39243921
</div>
39253922

39263923
<div class="example">
39273924
<p>
3928-
`upgrade()$m ~methodを利用すれば、
3929-
要素を意のままに昇格できる。
3930-
<!-- `接続されて$いるになったとき -->
3931-
通常は,要素は`接続されたとき$に自動的に昇格されるが、
3925+
`upgrade()$m ~methodは、
3926+
要素を意のままに昇格することを許容する。
3927+
通常は,要素は`接続されたとき$【!`接続されて$いるになったとき】に自動的に昇格されるが、
39323928
そうなる前に昇格する必要があるときなど。
39333929
39343930
The upgrade() method allows upgrading of elements at will. Normally elements are automatically upgraded when they become connected, but this method can be used if you need to upgrade before you're ready to connect the element.
@@ -4014,9 +4010,9 @@ <h4 title="The CustomElementRegistry interface">4.13.4. `CustomElementRegistry^I
40144010
<p>
40154011
%root の`広義-子孫$たちを成す
40164012
~EACH( %広義-子孫 )
4017-
に対し:
4013+
に対し,`~tree順序$で
40184014
4019-
For each inclusive descendant inclusiveDescendant of root:\
4015+
For each inclusive descendant inclusiveDescendant of root, in tree order:
40204016
</p>
40214017
<ol>
40224018
<li>
@@ -4026,30 +4022,43 @@ <h4 title="The CustomElementRegistry interface">4.13.4. `CustomElementRegistry^I
40264022
40274023
~CONTINUE
40284024
4029-
if inclusiveDescendant is an Element node
4025+
If inclusiveDescendant is not an Element node, then continue.
40304026
</li>
40314027
<li>
4028+
<p>
40324029
~IF[
4033-
%広義-子孫 の`~custom要素~registry$el ~NEQ ~NULL
4034-
4035-
4036-
~CONTINUE
4030+
%広義-子孫 の`~custom要素~registry$el ~EQ ~NULL
4031+
]:
40374032
4038-
whose custom element registry is null:
4039-
</li>
4040-
<li>
4033+
If inclusiveDescendant's custom element registry is null:
4034+
</p>
4035+
<ol>
4036+
<li>
40414037
%広義-子孫 の`~custom要素~registry$el ~SET コレ
40424038
40434039
Set inclusiveDescendant's custom element registry to this.
40444040
</li>
4045-
<li>
4041+
<li>
40464042
~IF[
40474043
コレの`視野~付きか$cR ~EQ ~T
40484044
40494045
40504046
コレの`視野~付き文書~集合$cRに %広義-子孫 の`~node文書$を`付加する$set
40514047
40524048
If this's is scoped is true, then append inclusiveDescendant's node document to this's scoped document set.
4049+
</li>
4050+
</ol>
4051+
</li>
4052+
<li>
4053+
~IF[
4054+
%広義-子孫 の`~custom要素~registry$el ~EQ コレ
4055+
4056+
4057+
`要素を昇格するよう試行する$( %広義-子孫 )
4058+
4059+
If inclusiveDescendant's custom element registry is not this, then continue.
4060+
4061+
Try to upgrade inclusiveDescendant.
40534062
</li>
40544063
</ol>
40554064
</li>
@@ -4058,8 +4067,8 @@ <h4 title="The CustomElementRegistry interface">4.13.4. `CustomElementRegistry^I
40584067
<p class="note">注記:
40594068
~nodeの~custom要素~registryは、
40604069
ある `CustomElementRegistry$I ~objに初期化されて以降は,変更し得なくなる
4061-
そのようにしたのは,意図的であり、[
4062-
~codeについての理屈を単純~化するため
4070+
そうなっているのは,意図的であり、[
4071+
~codeについての理由付けを単純~化するため
40634072
]および[
40644073
最適化することを実装に許容するため
40654074
]である。
@@ -4098,7 +4107,7 @@ <h4 title="Upgrades">4.13.5. 昇格</h4>
40984107
<div class="example">
40994108
<p>
41004109
これが生じ得る局面は、
4101-
次の例に示すように,この~algoが再入的に呼出されたときである:
4110+
次の例に示すとおり,この~algoが再入的に呼出されたときである:
41024111
41034112
One scenario where this can occur due to reentrant invocation of this algorithm, as in the following example:
41044113
</p>

0 commit comments

Comments
 (0)