class Window
extends EventTarget
Re-export
import { Window } from "https://deno.land/x/gauntlet@v0.0.9/imports/happy_dom.ts";
Handles the Window.
Properties
readonly
console: Consolereadonly
customElements: CustomElementRegistryreadonly
document: DocumentError: ErrorConstructor
readonly
happyDOM: { whenAsyncComplete: () => Promise<void>; cancelAsync: () => void; asyncTaskManager: AsyncTaskManager; }readonly
history: Historyreadonly
localStorage: Storagereadonly
location: Locationreadonly
NodeFilter: { FILTER_ACCEPT: number; FILTER_REJECT: number; FILTER_SKIP: number; SHOW_ALL: number; SHOW_ATTRIBUTE: number; SHOW_CDATA_SECTION: number; SHOW_COMMENT: number; SHOW_DOCUMENT: number; SHOW_DOCUMENT_FRAGMENT: number; SHOW_DOCUMENT_TYPE: number; SHOW_ELEMENT: number; SHOW_ENTITY: number; SHOW_ENTITY_REFERENCE: number; SHOW_NOTATION: number; SHOW_PROCESSING_INSTRUCTION: number; SHOW_TEXT: number; }onerror: (event: ErrorEvent) => void
onload: (event: Event) => void
readonly
screen: Screenreadonly
sessionStorage: StorageMethods
cancelAnimationFrame(id: NodeJS.Timeout): void
Mock animation frames with timeouts.
clearInterval(id: NodeJS.Timeout): void
Cancels a timed repeating action which was previously established by a call to setInterval().
clearTimeout(id: NodeJS.Timeout): void
Cancels a timeout previously established by calling setTimeout().
eval(code: string): void
Evaluates code.
fetch(url: string, options?: IFetchOptions): Promise<IResponse>
Provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
getComputedStyle(element: HTMLElement): CSSStyleDeclaration
Returns an object containing the values of all CSS properties of an element.
requestAnimationFrame(callback: (timestamp: number) => void): NodeJS.Timeout
Mock animation frames with timeouts.
scroll(x: { top?: number; left?: number; behavior?: string; } | number, y?: number): void
Scrolls to a particular set of coordinates.
scrollTo(x: { top?: number; left?: number; behavior?: string; } | number, y?: number): void
Scrolls to a particular set of coordinates.
setInterval(callback: () => void, delay?: number): NodeJS.Timeout
Calls a function with a fixed time delay between each call.
setTimeout(callback: () => void, delay?: number): NodeJS.Timeout
Sets a timer which executes a function once the timer expires.