Skip to content

Commit 23d9d12

Browse files
committed
update test
1 parent c28f98b commit 23d9d12

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

packages/svelte/tests/validator/samples/global-event-reference/input.svelte

-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
<button {onclick}></button>
66
<button onclick={onclick}></button>
77

8-
<button {onTypeScriptWillCatchThis}></button>
9-
<button onTypeScriptWillCatchThis={onTypeScriptWillCatchThis}></button>
10-
118
<button {onkeydown}></button>
129
<button onkeydown={onkeydown}></button>
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[
22
{
33
"code": "global-event-reference",
4-
"message": "You are referencing the global property window.onkeydown. Did you forget to declare a variable with that name?",
4+
"message": "You are referencing globalThis.onkeydown. Did you forget to declare a variable with that name?",
55
"start": {
66
"column": 8,
7-
"line": 11
7+
"line": 8
88
},
99
"end": {
1010
"column": 19,
11-
"line": 11
11+
"line": 8
1212
}
1313
},
1414
{
1515
"code": "global-event-reference",
16-
"message": "You are referencing the global property window.onkeydown. Did you forget to declare a variable with that name?",
16+
"message": "You are referencing globalThis.onkeydown. Did you forget to declare a variable with that name?",
1717
"start": {
1818
"column": 8,
19-
"line": 12
19+
"line": 9
2020
},
2121
"end": {
2222
"column": 29,
23-
"line": 12
23+
"line": 9
2424
}
2525
}
2626
]

0 commit comments

Comments
 (0)