Skip to content

LockSource

Defined in: src/modules/input/mouse-look.ts:44

Document-like source of lock state: the provider listens here for pointerlockchange / pointermove and asks it which element is locked.

Injectable because jsdom ships no pointer-lock API — tests pass a plain EventTarget with pointerLockElement assigned.

  • EventTarget

optional exitPointerLock?: () => void

Defined in: src/modules/input/mouse-look.ts:46

void


pointerLockElement: Element | null

Defined in: src/modules/input/mouse-look.ts:45

addEventListener(type, callback, options?): void

Defined in: node_modules/typescript/lib/lib.dom.d.ts:11569

The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

MDN Reference

string

EventListenerOrEventListenerObject | null

boolean | AddEventListenerOptions

void

EventTarget.addEventListener


dispatchEvent(event): boolean

Defined in: node_modules/typescript/lib/lib.dom.d.ts:11575

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

MDN Reference

Event

boolean

EventTarget.dispatchEvent


removeEventListener(type, callback, options?): void

Defined in: node_modules/typescript/lib/lib.dom.d.ts:11581

The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

MDN Reference

string

EventListenerOrEventListenerObject | null

boolean | EventListenerOptions

void

EventTarget.removeEventListener