This repository was archived by the owner on Mar 19, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +78
-0
lines changed
custom-elements/form-associated Expand file tree Collapse file tree 1 file changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE HTML>
2
+ < script src ="/resources/testharness.js "> </ script >
3
+ < script src ="/resources/testharnessreport.js "> </ script >
4
+ < script >
5
+ class TestElement extends HTMLElement {
6
+ constructor ( ) {
7
+ super ( ) ;
8
+ this . _internals = this . attachInternals ( ) ;
9
+ }
10
+
11
+ get internals ( ) {
12
+ return this . _internals ;
13
+ }
14
+
15
+ set internals ( val ) {
16
+ throw "Can't set internals!" ;
17
+ }
18
+ }
19
+ customElements . define ( "test-element" , TestElement ) ;
20
+ </ script >
21
+
22
+ < test-element id = "testElement "> </ test-element >
23
+
24
+ < script >
25
+ const element = document . getElementById ( "testElement" ) ;
26
+ const properties = [
27
+ "role" ,
28
+ "ariaActiveDescendant" ,
29
+ "ariaAtomic" ,
30
+ "ariaAutoComplete" ,
31
+ "ariaBusy" ,
32
+ "ariaChecked" ,
33
+ "ariaColCount" ,
34
+ "ariaColIndex" ,
35
+ "ariaColSpan" ,
36
+ "ariaControls" ,
37
+ "ariaCurrent" ,
38
+ "ariaDescribedBy" ,
39
+ "ariaDetails" ,
40
+ "ariaDisabled" ,
41
+ "ariaErrorMessage" ,
42
+ "ariaExpanded" ,
43
+ "ariaFlowTo" ,
44
+ "ariaHasPopup" ,
45
+ "ariaHidden" ,
46
+ "ariaKeyShortcuts" ,
47
+ "ariaLabel" ,
48
+ "ariaLabelledBy" ,
49
+ "ariaLevel" ,
50
+ "ariaLive" ,
51
+ "ariaModal" ,
52
+ "ariaMultiLine" ,
53
+ "ariaMultiSelectable" ,
54
+ "ariaOrientation" ,
55
+ "ariaOwns" ,
56
+ "ariaPlaceholder" ,
57
+ "ariaPosInSet" ,
58
+ "ariaPressed" ,
59
+ "ariaReadOnly" ,
60
+ "ariaRelevant" ,
61
+ "ariaRequired" ,
62
+ "ariaRoleDescription" ,
63
+ "ariaRowCount" ,
64
+ "ariaRowIndex" ,
65
+ "ariaRowSpan" ,
66
+ "ariaSelected" ,
67
+ "ariaSort" ,
68
+ "ariaValueMax" ,
69
+ "ariaValueMin" ,
70
+ "ariaValueNow" ,
71
+ "ariaValueText"
72
+ ] ;
73
+ for ( const property of properties ) {
74
+ test ( ( ) => {
75
+ assert_inherits ( element . internals , property ) ;
76
+ } , property + " is defined in ElementInternals" ) ;
77
+ }
78
+ </ script >
You can’t perform that action at this time.
0 commit comments