Skip to content

CloseEvent

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3399

A CloseEvent is sent to clients using WebSockets when the connection is closed.

MDN Reference

new CloseEvent(type, initializer?): CloseEvent

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3400

string

CloseEventInit

CloseEvent

Event.constructor

readonly bubbles: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:763

The bubbles read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.

MDN Reference

Event.bubbles


readonly cancelable: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:769

The cancelable read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.

MDN Reference

Event.cancelable


cancelBubble: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:820

The cancelBubble property of the Event interface is deprecated.

Event.cancelBubble


readonly code: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3406

The code read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.

MDN Reference


readonly composed: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:757

The read-only composed property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.

MDN Reference

Event.composed


readonly optional currentTarget: EventTarget<Record<string, Event>>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:788

The currentTarget read-only property of the Event interface identifies the element to which the event handler has been attached.

MDN Reference

Event.currentTarget


readonly defaultPrevented: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:775

The defaultPrevented read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.

MDN Reference

Event.defaultPrevented


readonly eventPhase: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:751

The eventPhase read-only property of the being evaluated.

MDN Reference

Event.eventPhase


readonly isTrusted: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:813

The isTrusted read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via The only exception is the click event, which initializes the isTrusted property to false in user agents.

MDN Reference

Event.isTrusted


readonly reason: string

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3412

The reason read-only property of the CloseEvent interface returns the WebSocket connection close reason the server gave for closing the connection; that is, a concise human-readable prose explanation for the closure.

MDN Reference


readonly returnValue: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:782

The Event property returnValue indicates whether the default action for this event has been prevented or not.

Event.returnValue


readonly srcElement: null | EventTarget<Record<string, Event>>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:801

The deprecated Event.srcElement is an alias for the Event.target property.

Event.srcElement


readonly optional target: EventTarget<Record<string, Event>>

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:794

The read-only target property of the dispatched.

MDN Reference

Event.target


readonly timeStamp: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:807

The timeStamp read-only property of the Event interface returns the time (in milliseconds) at which the event was created.

MDN Reference

Event.timeStamp


readonly type: string

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:745

The type read-only property of the Event interface returns a string containing the event’s type.

MDN Reference

Event.type


readonly wasClean: boolean

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:3418

The wasClean read-only property of the CloseEvent interface returns true if the connection closed cleanly.

MDN Reference


readonly static AT_TARGET: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:847

Event.AT_TARGET


readonly static BUBBLING_PHASE: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:848

Event.BUBBLING_PHASE


readonly static CAPTURING_PHASE: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:846

Event.CAPTURING_PHASE


readonly static NONE: number

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:845

Event.NONE

composedPath(): EventTarget<Record<string, Event>>[]

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:844

The composedPath() method of the Event interface returns the event’s path which is an array of the objects on which listeners will be invoked.

MDN Reference

EventTarget<Record<string, Event>>[]

Event.composedPath


preventDefault(): void

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:832

The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.

MDN Reference

void

Event.preventDefault


stopImmediatePropagation(): void

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:826

The stopImmediatePropagation() method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.

MDN Reference

void

Event.stopImmediatePropagation


stopPropagation(): void

Defined in: node_modules/.pnpm/@cloudflare+workers-types@4.20251118.0/node_modules/@cloudflare/workers-types/index.ts:838

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

MDN Reference

void

Event.stopPropagation