File tree Expand file tree Collapse file tree 1 file changed +49
-4
lines changed
Expand file tree Collapse file tree 1 file changed +49
-4
lines changed Original file line number Diff line number Diff line change 1- document . addEventListener ( "arbitrary_invalid_event" , ( ev ) => {
2- return ev . returnValue ;
3- } ) ;
4-
51document . addEventListener ( "arbitrary_invalid_event" , {
62 handleEvent ( ev ) {
73 return ev . returnValue ;
4+ } ,
5+ } ) ;
6+ const divElement : HTMLElement = document . createElement ( "div" ) ;
7+
8+ /**
9+ * addEventListener works with a single event arg, Event
10+ */
11+ divElement . addEventListener (
12+ "click" ,
13+ ( event : Event ) => {
14+ if ( event ) {
15+ return ;
16+ }
17+ } ,
18+ false ,
19+ ) ;
20+ /**
21+ * HTMLElement addEventListener works with a custom string and single event arg, Event
22+ */
23+ divElement . addEventListener ( "beep" , ( event : Event ) => {
24+ if ( event ) {
25+ return ;
26+ }
27+ } ) ;
28+
29+ const svgElement = document . createElementNS (
30+ "http://www.w3.org/2000/svg" ,
31+ "svg" ,
32+ ) ;
33+
34+ /**
35+ * SVGElement addEventListener works with a single event arg, Event
36+ */
37+ svgElement . addEventListener (
38+ "click" ,
39+ ( event : Event ) => {
40+ if ( event ) {
41+ return ;
42+ }
43+ } ,
44+ false ,
45+ ) ;
46+
47+ /**
48+ * SVGElement addEventListener works with a custom string and single event arg, Event
49+ */
50+ svgElement . addEventListener ( "beep" , ( event : Event ) => {
51+ if ( event ) {
52+ return ;
853 }
954} ) ;
You can’t perform that action at this time.
0 commit comments