Skip to content

Interface: BrowserWindow

API / @xmachines/play-dom-router / BrowserWindow

Defined in: play-dom-router/src/create-browser-history.ts:67

The minimal window interface of createBrowserHistory

This structural interface holds only the properties that the package uses. It accepts Window, a JSDOM window, and every compatible test double. The package therefore does not depend on Window & typeof globalThis, which is different in each environment.

Properties

PropertyModifierTypeDefined in
historypublicobjectplay-dom-router/src/create-browser-history.ts:68
history.statereadonlyunknownplay-dom-router/src/create-browser-history.ts:69
history.backpublicvoidplay-dom-router/src/create-browser-history.ts:73
history.forwardpublicvoidplay-dom-router/src/create-browser-history.ts:74
history.gopublicvoidplay-dom-router/src/create-browser-history.ts:72
history.pushStatepublicvoidplay-dom-router/src/create-browser-history.ts:70
history.replaceStatepublicvoidplay-dom-router/src/create-browser-history.ts:71
locationpublicobjectplay-dom-router/src/create-browser-history.ts:76
location.hashreadonlystringplay-dom-router/src/create-browser-history.ts:79
location.pathnamereadonlystringplay-dom-router/src/create-browser-history.ts:77
location.searchreadonlystringplay-dom-router/src/create-browser-history.ts:78

Methods

addEventListener()

addEventListener(type, listener): void;

Defined in: play-dom-router/src/create-browser-history.ts:81

Parameters

ParameterType
type"popstate"
listener() => void

Returns

void


removeEventListener()

removeEventListener(type, listener): void;

Defined in: play-dom-router/src/create-browser-history.ts:82

Parameters

ParameterType
type"popstate"
listener() => void

Returns

void