Skip to content

Interface: BrowserWindow

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

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

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:105
history.statereadonlyunknownplay-dom-router/src/create-browser-history.ts:106
history.backpublicvoidplay-dom-router/src/create-browser-history.ts:110
history.forwardpublicvoidplay-dom-router/src/create-browser-history.ts:111
history.gopublicvoidplay-dom-router/src/create-browser-history.ts:109
history.pushStatepublicvoidplay-dom-router/src/create-browser-history.ts:107
history.replaceStatepublicvoidplay-dom-router/src/create-browser-history.ts:108
locationpublicobjectplay-dom-router/src/create-browser-history.ts:113
location.hashreadonlystringplay-dom-router/src/create-browser-history.ts:116
location.pathnamereadonlystringplay-dom-router/src/create-browser-history.ts:114
location.searchreadonlystringplay-dom-router/src/create-browser-history.ts:115

Methods

addEventListener()

addEventListener(type, listener): void;

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

Parameters

ParameterType
type"popstate"
listener() => void

Returns

void


removeEventListener()

removeEventListener(type, listener): void;

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

Parameters

ParameterType
type"popstate"
listener() => void

Returns

void