Sha256: 81a5b42f241374bc78538d1551515a03c9b64395dd017008e19ff4422906ce23
Contents?: true
Size: 1.31 KB
Versions: 26
Compression:
Stored size: 1.31 KB
Contents
export class EventPolyfill implements Event { readonly NONE = 0 readonly CAPTURING_PHASE = 1 readonly AT_TARGET = 2 readonly BUBBLING_PHASE = 3 public type: string = '' public srcElement: EventTarget | null = null public target: EventTarget | null public currentTarget: EventTarget | null = null public eventPhase: number = 0 public timeStamp: number public isTrusted: boolean = true public composed: boolean = false public cancelable: boolean = true public defaultPrevented: boolean = false public bubbles: boolean = true public lengthComputable: boolean = true public loaded: number = 0 public total: number = 0 cancelBubble: boolean = false returnValue: boolean = true constructor( type: string, options?: { target: EventTarget; currentTarget: EventTarget } ) { this.type = type this.target = options?.target || null this.currentTarget = options?.currentTarget || null this.timeStamp = Date.now() } public composedPath(): EventTarget[] { return [] } public initEvent(type: string, bubbles?: boolean, cancelable?: boolean) { this.type = type this.bubbles = !!bubbles this.cancelable = !!cancelable } public preventDefault() { this.defaultPrevented = true } public stopPropagation() {} public stopImmediatePropagation() {} }
Version data entries
26 entries across 26 versions & 1 rubygems