Commit b685181 1 parent bea5b03 commit b685181 Copy full SHA for b685181
File tree 4 files changed +57
-18
lines changed
4 files changed +57
-18
lines changed Original file line number Diff line number Diff line change 1
1
< html class ="test-wait ">
2
2
< body > </ body >
3
3
< script >
4
+
5
+ // Bypass this abandoned syntax in all but the engines that implement it.
6
+ if ( typeof getComputedAccessibleNode !== 'undefined' ) {
7
+
4
8
const frameElem = document . createElement ( 'iframe' ) ;
5
9
6
10
frameElem . srcdoc = '<html><head><title>X</title></head><body><div>-</div></body></html>' ;
21
25
} ) ;
22
26
} ) ;
23
27
} ;
24
-
25
28
document . body . appendChild ( frameElem ) ;
29
+
30
+ } else {
31
+ // Pass in other engines that have not implemented the abandoned API
32
+ document . documentElement . className = '' ;
33
+ }
26
34
</ script >
27
35
</ html >
Original file line number Diff line number Diff line change 6
6
< h1 > Heading</ h1 >
7
7
8
8
< script >
9
- async function trigger1 ( ) {
10
- let heading = document . querySelector ( 'h1' ) ;
11
- let computed_accessible_node = await self . getComputedAccessibleNode ( heading ) ;
12
- let first_child = computed_accessible_node . firstChild ;
13
- // The first child of the heading is a pseudo element <table>.
14
- await first_child . ensureUpToDate ( ) ;
15
- // The next child down has an accessibility object but no node.
16
- let grand_child = first_child . firstChild ;
17
- await grand_child . ensureUpToDate ( ) ;
9
+
10
+ // Bypass this abandoned syntax in all but the engines that implement it.
11
+ if ( typeof getComputedAccessibleNode !== 'undefined' ) {
12
+
13
+ async function trigger1 ( ) {
14
+ let heading = document . querySelector ( 'h1' ) ;
15
+ let computed_accessible_node = await self . getComputedAccessibleNode ( heading ) ;
16
+ let first_child = computed_accessible_node . firstChild ;
17
+ // The first child of the heading is a pseudo element <table>.
18
+ await first_child . ensureUpToDate ( ) ;
19
+ // The next child down has an accessibility object but no node.
20
+ let grand_child = first_child . firstChild ;
21
+ await grand_child . ensureUpToDate ( ) ;
22
+ document . documentElement . className = '' ;
23
+ }
24
+ trigger1 ( ) ;
25
+
26
+ } else {
27
+ // Pass in other engines that have not implemented the abandoned API
18
28
document . documentElement . className = '' ;
19
29
}
20
- trigger1 ( ) ;
30
+
21
31
</ script >
22
32
</ html >
Original file line number Diff line number Diff line change 1
1
< html class ="test-wait ">
2
2
< img id ="img1 "> text
3
3
< script >
4
- async function trigger1 ( ) {
5
- let img = document . getElementById ( 'img1' ) ;
6
- let computed_accessible_node = await self . getComputedAccessibleNode ( img ) ;
7
- // The next sibling is a text node.
8
- let next_sibling = computed_accessible_node . nextSibling ;
9
- await next_sibling . ensureUpToDate ( ) ;
4
+
5
+ // Bypass this abandoned syntax in all but the engines that implement it.
6
+ if ( typeof getComputedAccessibleNode !== 'undefined' ) {
7
+
8
+ async function trigger1 ( ) {
9
+ let img = document . getElementById ( 'img1' ) ;
10
+ let computed_accessible_node = await self . getComputedAccessibleNode ( img ) ;
11
+ // The next sibling is a text node.
12
+ let next_sibling = computed_accessible_node . nextSibling ;
13
+ await next_sibling . ensureUpToDate ( ) ;
14
+ document . documentElement . className = '' ;
15
+ }
16
+ trigger1 ( ) ;
17
+
18
+ } else {
19
+ // Pass in other engines that have not implemented the abandoned API
10
20
document . documentElement . className = '' ;
11
21
}
12
- trigger1 ( ) ;
22
+
13
23
</ script >
14
24
</ html >
Original file line number Diff line number Diff line change 19
19
</ script >
20
20
< script > step_timeout ( gc , 50 ) ; </ script >
21
21
< script >
22
+
23
+ // Bypass this abandoned syntax in all but the engines that implement it.
24
+ if ( typeof getComputedAccessibleNode !== 'undefined' ) {
25
+
22
26
const frameElem = document . createElement ( 'iframe' ) ;
23
27
24
28
frameElem . srcdoc = '<div></div>' ;
34
38
} ) ;
35
39
} ;
36
40
document . body . appendChild ( frameElem ) ;
41
+
42
+ } else {
43
+ // Pass in other engines that have not implemented the abandoned API
44
+ document . documentElement . className = '' ;
45
+ }
46
+
47
+
37
48
</ script >
38
49
</ html >
You can’t perform that action at this time.
0 commit comments