File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,11 @@ export function eventTest() {
210210 }
211211 fireEvent . click ( element . firstChild )
212212
213+ // GlobalThis
214+ fireEvent . click ( globalThis )
215+ const globalThisEvent = createEvent ( 'customEvent' , globalThis )
216+ fireEvent ( globalThis , globalThisEvent )
217+
213218 // Custom event
214219 const customEvent = createEvent ( 'customEvent' , element )
215220 fireEvent ( element , customEvent )
Original file line number Diff line number Diff line change @@ -92,24 +92,24 @@ export type EventType =
9292 | 'pageShow'
9393
9494export type FireFunction = (
95- element : Document | Element | Window | Node ,
95+ element : Document | Element | Window | Node | GlobalThis ,
9696 event : Event ,
9797) => boolean
9898export type FireObject = {
9999 [ K in EventType ] : (
100- element : Document | Element | Window | Node ,
100+ element : Document | Element | Window | Node | GlobalThis ,
101101 options ?: { } ,
102102 ) => boolean
103103}
104104export type CreateFunction = (
105105 eventName : string ,
106- node : Document | Element | Window | Node ,
106+ node : Document | Element | Window | Node | GlobalThis ,
107107 init ?: { } ,
108108 options ?: { EventType ?: string ; defaultInit ?: { } } ,
109109) => Event
110110export type CreateObject = {
111111 [ K in EventType ] : (
112- element : Document | Element | Window | Node ,
112+ element : Document | Element | Window | Node | GlobalThis ,
113113 options ?: { } ,
114114 ) => Event
115115}
You can’t perform that action at this time.
0 commit comments