Skip to content

Commit ef95d40

Browse files
committed
Bug 2001295 [wpt PR 56132] - CustomElementRegistry.prototype.initialize upgrades already initialized elements, a=testonly
Automatic update from web-platform-tests CustomElementRegistry.prototype.initialize upgrades already initialized elements For whatwg/html#11913. -- wpt-commits: ba9d85e81e45978e36b8d4b26b7a91e65383b296 wpt-pr: 56132 UltraBlame original commit: 4a9cf72bcdbbf99913cdf6261cfd935595af6d7d
1 parent 95933fe commit ef95d40

File tree

1 file changed

+160
-3
lines changed

1 file changed

+160
-3
lines changed

testing/web-platform/tests/custom-elements/registries/scoped-registry-initialize-upgrades.html

Lines changed: 160 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
title
205205
}
206206
:
207-
customElementRegistry
207+
CustomElementRegistry
208208
.
209209
prototype
210210
.
@@ -529,7 +529,7 @@
529529
title
530530
}
531531
:
532-
customElementRegistry
532+
CustomElementRegistry
533533
.
534534
prototype
535535
.
@@ -775,7 +775,7 @@
775775
title
776776
}
777777
:
778-
customElementRegistry
778+
CustomElementRegistry
779779
.
780780
prototype
781781
.
@@ -858,6 +858,163 @@
858858
)
859859
)
860860
;
861+
test
862+
(
863+
(
864+
)
865+
=
866+
>
867+
{
868+
class
869+
ABElement
870+
extends
871+
HTMLElement
872+
{
873+
}
874+
;
875+
const
876+
registry
877+
=
878+
new
879+
CustomElementRegistry
880+
;
881+
const
882+
element
883+
=
884+
document
885+
.
886+
createElement
887+
(
888+
'
889+
a
890+
-
891+
b
892+
'
893+
{
894+
customElementRegistry
895+
:
896+
registry
897+
}
898+
)
899+
;
900+
assert_equals
901+
(
902+
element
903+
.
904+
customElementRegistry
905+
registry
906+
)
907+
;
908+
assert_equals
909+
(
910+
element
911+
.
912+
__proto__
913+
.
914+
constructor
915+
.
916+
name
917+
'
918+
HTMLElement
919+
'
920+
)
921+
;
922+
assert_false
923+
(
924+
element
925+
instanceof
926+
ABElement
927+
)
928+
;
929+
registry
930+
.
931+
define
932+
(
933+
'
934+
a
935+
-
936+
b
937+
'
938+
ABElement
939+
)
940+
;
941+
assert_equals
942+
(
943+
element
944+
.
945+
customElementRegistry
946+
registry
947+
)
948+
;
949+
assert_equals
950+
(
951+
element
952+
.
953+
__proto__
954+
.
955+
constructor
956+
.
957+
name
958+
'
959+
HTMLElement
960+
'
961+
)
962+
;
963+
assert_false
964+
(
965+
element
966+
instanceof
967+
ABElement
968+
)
969+
;
970+
registry
971+
.
972+
initialize
973+
(
974+
element
975+
)
976+
;
977+
assert_equals
978+
(
979+
element
980+
.
981+
customElementRegistry
982+
registry
983+
)
984+
;
985+
assert_equals
986+
(
987+
element
988+
.
989+
__proto__
990+
.
991+
constructor
992+
.
993+
name
994+
'
995+
ABElement
996+
'
997+
)
998+
;
999+
assert_true
1000+
(
1001+
element
1002+
instanceof
1003+
ABElement
1004+
)
1005+
;
1006+
}
1007+
CustomElementRegistry
1008+
.
1009+
prototype
1010+
.
1011+
initialize
1012+
upgrades
1013+
already
1014+
initialized
1015+
elements
1016+
)
1017+
;
8611018
<
8621019
/
8631020
script

0 commit comments

Comments
 (0)