Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/gauntlet/imports/happy_dom.ts>Window

Work-in-progress front-end tool which does put a smile on my face
Latest
class Window
implements IWindow, [NodeJS.Global]
extends EventTarget
Re-export
import { Window } from "https://deno.land/x/gauntlet@v0.0.9/imports/happy_dom.ts";

Handles the Window.

Constructors

new
Window()

Constructor.

Properties

readonly
AnimationEvent: AnimationEvent
Array: ArrayConstructor
ArrayBuffer: ArrayBufferConstructor
readonly
Blob: Blob
Boolean: BooleanConstructor
Buffer: any
clearImmediate: any
readonly
Comment: Comment
readonly
console: Console
readonly
CSSStyleSheet: CSSStyleSheet
readonly
CustomElementRegistry: CustomElementRegistry
readonly
customElements: CustomElementRegistry
readonly
CustomEvent: CustomEvent
readonly
DataTransfer: DataTransfer
readonly
DataTransferItem: DataTransferItem
readonly
DataTransferItemList: DataTransferItemList
DataView: DataViewConstructor
Date: DateConstructor
decodeURI: decodeURI
decodeURIComponent: decodeURIComponent
readonly
document: Document
readonly
Document: Document
readonly
DocumentFragment: DocumentFragment
readonly
DOMException: DOMException
readonly
DOMParser: DOMParser
readonly
Element: Element
encodeURI: encodeURI
encodeURIComponent: encodeURIComponent
readonly
ErrorEvent: ErrorEvent
escape: ((str: string) => string) & escape
EvalError: EvalErrorConstructor
readonly
Event: Event
readonly
EventTarget: EventTarget
readonly
File: File
readonly
FileReader: FileReader
Float32Array: Float32ArrayConstructor
Float64Array: Float64ArrayConstructor
readonly
FocusEvent: FocusEvent
Function: FunctionConstructor
gc: any
global: any
GLOBAL: any
readonly
happyDOM: { whenAsyncComplete: () => Promise<void>; cancelAsync: () => void; asyncTaskManager: AsyncTaskManager; }
readonly
Headers: MapConstructor
readonly
history: History
readonly
History: History
readonly
HTMLDocument: HTMLDocument
readonly
HTMLElement: HTMLElement
readonly
HTMLFormElement: HTMLFormElement
readonly
HTMLImageElement: HTMLImageElement
readonly
HTMLInputElement: HTMLInputElement
readonly
HTMLLinkElement: HTMLLinkElement
readonly
HTMLScriptElement: HTMLScriptElement
readonly
HTMLStyleElement: HTMLStyleElement
readonly
HTMLTemplateElement: HTMLTemplateElement
readonly
HTMLTextAreaElement: HTMLTextAreaElement
Infinity: number
readonly
innerHeight: number
readonly
innerWidth: number
readonly
InputEvent: InputEvent
Int16Array: Int16ArrayConstructor
Int32Array: Int32ArrayConstructor
Int8Array: Int8ArrayConstructor
Intl: Intl
isFinite: isFinite
isNaN: isNaN
JSON: JSON
readonly
KeyboardEvent: KeyboardEvent
readonly
localStorage: Storage
readonly
location: Location
readonly
Location: Location
Map: MapConstructor
Math: Math
readonly
MouseEvent: MouseEvent
readonly
MutationObserver: MutationObserver
NaN: number
readonly
navigator: { userAgent: string; }
readonly
Node: Node
readonly
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; }
Number: NumberConstructor
Object: ObjectConstructor
onerror: (event: ErrorEvent) => void
onload: (event: Event) => void
readonly
parent: this
parseFloat: parseFloat
parseInt: parseInt
process: any
readonly
ProgressEvent: ProgressEvent
Promise: PromiseConstructor
queueMicrotask: queueMicrotask
RangeError: RangeErrorConstructor
ReferenceError: ReferenceErrorConstructor
Reflect: Reflect
RegExp: RegExpConstructor
readonly
ResizeObserver: ResizeObserver
root: any
readonly
screen: Screen
readonly
Screen: Screen
readonly
self: this
readonly
sessionStorage: Storage
Set: SetConstructor
setImmediate: any
readonly
ShadowRoot: ShadowRoot
readonly
Storage: Storage
String: StringConstructor
readonly
SVGDocument: SVGDocument
readonly
SVGElement: SVGElement
readonly
SVGSVGElement: SVGSVGElement
Symbol: Function & SymbolConstructor
SyntaxError: SyntaxErrorConstructor
readonly
Text: Text
readonly
top: this
readonly
TreeWalker: TreeWalker
TypeError: TypeErrorConstructor
readonly
UIEvent: UIEvent
Uint16Array: Uint16ArrayConstructor
Uint32Array: Uint32ArrayConstructor
Uint8Array: Uint8ArrayConstructor
Uint8ClampedArray: Uint8ClampedArrayConstructor
undefined: any
unescape: ((str: string) => string) & unescape
URIError: URIErrorConstructor
readonly
URL: URL
v8debug: any
WeakMap: WeakMapConstructor
WeakSet: WeakSetConstructor
readonly
WheelEvent: WheelEvent
readonly
window: this
readonly
Window: Window
readonly
XMLDocument: XMLDocument
readonly
XMLSerializer: XMLSerializer

Methods

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.

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.