Interface: BrowserWindow
Documentation / @xmachines/play-router / BrowserWindow
Defined in: create-browser-history.ts:55
Minimal window interface for createBrowserHistory
Structural interface covering only the properties actually used.
Accepts Window, JSDOM window, or any compatible test double.
Avoids coupling to Window & typeof globalThis which varies across environments.
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
history | public | object | create-browser-history.ts:56 |
history.state | readonly | unknown | create-browser-history.ts:57 |
history.back | public | void | create-browser-history.ts:61 |
history.forward | public | void | create-browser-history.ts:62 |
history.go | public | void | create-browser-history.ts:60 |
history.pushState | public | void | create-browser-history.ts:58 |
history.replaceState | public | void | create-browser-history.ts:59 |
location | public | object | create-browser-history.ts:64 |
location.hash | readonly | string | create-browser-history.ts:67 |
location.pathname | readonly | string | create-browser-history.ts:65 |
location.search | readonly | string | create-browser-history.ts:66 |
Methods
addEventListener()
addEventListener(type, listener): void;Defined in: create-browser-history.ts:69
Parameters
| Parameter | Type |
|---|---|
type | "popstate" |
listener | () => void |
Returns
void
removeEventListener()
removeEventListener(type, listener): void;Defined in: create-browser-history.ts:70
Parameters
| Parameter | Type |
|---|---|
type | "popstate" |
listener | () => void |
Returns
void