File tree Expand file tree Collapse file tree 2 files changed +2
-125
lines changed
packages/svelte/src/compiler/phases Expand file tree Collapse file tree 2 files changed +2
-125
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,7 @@ import { warn } from '../../warnings.js';
1010import fuzzymatch from '../1-parse/utils/fuzzymatch.js' ;
1111import { disallowed_parapgraph_contents , interactive_elements } from '../1-parse/utils/html.js' ;
1212import { binding_properties } from '../bindings.js' ;
13- import {
14- ContentEditableBindings ,
15- EventModifiers ,
16- SVGElements ,
17- global_events
18- } from '../constants.js' ;
13+ import { ContentEditableBindings , EventModifiers , SVGElements } from '../constants.js' ;
1914import { is_custom_element_node } from '../nodes.js' ;
2015import {
2116 regex_illegal_attribute_character ,
@@ -84,8 +79,7 @@ function validate_element(node, context) {
8479 if (
8580 value . type === 'Identifier' &&
8681 value . name === attribute . name &&
87- ! context . state . scope . get ( value . name ) &&
88- global_events . has ( attribute . name )
82+ ! context . state . scope . get ( value . name )
8983 ) {
9084 warn (
9185 context . state . analysis . warnings ,
Original file line number Diff line number Diff line change @@ -197,120 +197,3 @@ export const JsKeywords = [
197197 'return' ,
198198 'this'
199199] ;
200-
201- /**
202- * Event variables that are available globally through the window object,
203- * but it's likely a user mistake if they're used
204- */
205- export const global_events = new Set ( [
206- 'onabort' ,
207- 'onafterprint' ,
208- 'onanimationcancel' ,
209- 'onanimationend' ,
210- 'onanimationiteration' ,
211- 'onanimationstart' ,
212- 'onauxclick' ,
213- 'onbeforeprint' ,
214- 'onbeforeunload' ,
215- 'onblur' ,
216- 'oncanplay' ,
217- 'oncanplaythrough' ,
218- 'onchange' ,
219- 'onclick' ,
220- 'onclose' ,
221- 'oncontextmenu' ,
222- 'oncuechange' ,
223- 'ondblclick' ,
224- 'ondevicemotion' ,
225- 'ondeviceorientation' ,
226- 'ondrag' ,
227- 'ondragend' ,
228- 'ondragenter' ,
229- 'ondragleave' ,
230- 'ondragover' ,
231- 'ondragstart' ,
232- 'ondrop' ,
233- 'ondurationchange' ,
234- 'onemptied' ,
235- 'onended' ,
236- 'onerror' ,
237- 'onfocus' ,
238- 'onformdata' ,
239- 'ongamepadconnected' ,
240- 'ongamepaddisconnected' ,
241- 'ongotpointercapture' ,
242- 'onhashchange' ,
243- 'oninput' ,
244- 'oninvalid' ,
245- 'onkeydown' ,
246- 'onkeypress' ,
247- 'onkeyup' ,
248- 'onlanguagechange' ,
249- 'onload' ,
250- 'onloadeddata' ,
251- 'onloadedmetadata' ,
252- 'onloadstart' ,
253- 'onlostpointercapture' ,
254- 'onmessage' ,
255- 'onmessageerror' ,
256- 'onmousedown' ,
257- 'onmouseenter' ,
258- 'onmouseleave' ,
259- 'onmousemove' ,
260- 'onmouseout' ,
261- 'onmouseover' ,
262- 'onmouseup' ,
263- 'onoffline' ,
264- 'ononline' ,
265- 'onorientationchange' ,
266- 'onpagehide' ,
267- 'onpageshow' ,
268- 'onpause' ,
269- 'onplay' ,
270- 'onplaying' ,
271- 'onpointercancel' ,
272- 'onpointerdown' ,
273- 'onpointerenter' ,
274- 'onpointerleave' ,
275- 'onpointermove' ,
276- 'onpointerout' ,
277- 'onpointerover' ,
278- 'onpointerup' ,
279- 'onpopstate' ,
280- 'onprogress' ,
281- 'onratechange' ,
282- 'onrejectionhandled' ,
283- 'onreset' ,
284- 'onresize' ,
285- 'onscroll' ,
286- 'onsecuritypolicyviolation' ,
287- 'onseeked' ,
288- 'onseeking' ,
289- 'onselect' ,
290- 'onselectionchange' ,
291- 'onselectstart' ,
292- 'onslotchange' ,
293- 'onstalled' ,
294- 'onstorage' ,
295- 'onsubmit' ,
296- 'onsuspend' ,
297- 'ontimeupdate' ,
298- 'ontoggle' ,
299- 'ontouchcancel' ,
300- 'ontouchend' ,
301- 'ontouchmove' ,
302- 'ontouchstart' ,
303- 'ontransitioncancel' ,
304- 'ontransitionend' ,
305- 'ontransitionrun' ,
306- 'ontransitionstart' ,
307- 'onunhandledrejection' ,
308- 'onunload' ,
309- 'onvolumechange' ,
310- 'onwaiting' ,
311- 'onwebkitanimationend' ,
312- 'onwebkitanimationiteration' ,
313- 'onwebkitanimationstart' ,
314- 'onwebkittransitionend' ,
315- 'onwheel'
316- ] ) ;
You can’t perform that action at this time.
0 commit comments