Skip to content

Commit 8c2b803

Browse files
author
Kristján Oddsson
authored
Merge pull request #32 from dgraham/allow-firing-events-on-document-in-typescript
Allow firing events on Document in TypeScript
2 parents 51b310d + 39c6b50 commit 8c2b803

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ type DelegatedEventListener = (this: Element, ev: CustomEvent & {currentTarget:
33
export function on<K extends keyof GlobalEventHandlersEventMap>(name: K, selector: string, listener: (this: GlobalEventHandlers & Element, ev: GlobalEventHandlersEventMap[K] & {currentTarget: Element}) => any, options?: EventListenerOptions): void;
44
export function on(name: string, selector: string, listener: DelegatedEventListener, options?: EventListenerOptions): void;
55
export function off(name: string, selector: string, listener: DelegatedEventListener, options?: EventListenerOptions): void;
6-
export function fire(target: Element, name: string, detail?: any): boolean;
6+
export function fire(target: Document | Element, name: string, detail?: any): boolean;

0 commit comments

Comments
 (0)