Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/gauntlet/imports/happy_dom.ts>IWindow

Work-in-progress front-end tool which does put a smile on my face
Latest
interface IWindow
Re-export
import { type IWindow } from "https://deno.land/x/gauntlet@v0.0.9/imports/happy_dom.ts";

Window.

Properties

readonly
happyDOM: { whenAsyncComplete: () => Promise<void>; cancelAsync: () => void; asyncTaskManager: AsyncTaskManager; }
readonly
Node: Node
readonly
HTMLElement: HTMLElement
readonly
HTMLTemplateElement: HTMLTemplateElement
readonly
HTMLFormElement: HTMLFormElement
readonly
HTMLInputElement: HTMLInputElement
readonly
HTMLTextAreaElement: HTMLTextAreaElement
readonly
HTMLImageElement: HTMLImageElement
readonly
HTMLScriptElement: HTMLScriptElement
readonly
HTMLLinkElement: HTMLLinkElement
readonly
HTMLStyleElement: HTMLStyleElement
readonly
SVGSVGElement: SVGSVGElement
readonly
SVGElement: SVGElement
readonly
Text: Text
readonly
Comment: Comment
readonly
ShadowRoot: ShadowRoot
readonly
Element: Element
readonly
DocumentFragment: DocumentFragment
readonly
NodeFilter: NodeFilter
readonly
TreeWalker: TreeWalker
readonly
DOMParser: DOMParser
readonly
MutationObserver: MutationObserver
readonly
Document: Document
readonly
HTMLDocument: HTMLDocument
readonly
XMLDocument: XMLDocument
readonly
SVGDocument: SVGDocument
readonly
Event: Event
readonly
UIEvent: UIEvent
readonly
CustomEvent: CustomEvent
readonly
AnimationEvent: AnimationEvent
readonly
KeyboardEvent: KeyboardEvent
readonly
MouseEvent: MouseEvent
readonly
FocusEvent: FocusEvent
readonly
WheelEvent: WheelEvent
readonly
InputEvent: InputEvent
readonly
ErrorEvent: ErrorEvent
readonly
ProgressEvent: ProgressEvent
readonly
EventTarget: EventTarget
readonly
DataTransfer: DataTransfer
readonly
DataTransferItem: DataTransferItem
readonly
DataTransferItemList: DataTransferItemList
readonly
URL: URL
readonly
Location: Location
readonly
CustomElementRegistry: CustomElementRegistry
readonly
Window: Window
readonly
Headers: Map
readonly
XMLSerializer: XMLSerializer
readonly
ResizeObserver: ResizeObserver
readonly
CSSStyleSheet: CSSStyleSheet
readonly
Blob: Blob
readonly
File: File
readonly
FileReader: FileReader
readonly
DOMException: DOMException
readonly
History: History
readonly
Screen: Screen
readonly
Storage: Storage
onload: (event: Event) => void
onerror: (event: ErrorEvent) => void
readonly
document: Document
readonly
customElements: CustomElementRegistry
readonly
location: Location
readonly
history: History
readonly
navigator: { userAgent: string; }
readonly
console: Console
readonly
self: IWindow
readonly
top: IWindow
readonly
parent: IWindow
readonly
window: IWindow
readonly
screen: Screen
readonly
innerWidth: number
readonly
innerHeight: number
readonly
sessionStorage: Storage
readonly
localStorage: Storage

Methods

eval(code: string): void

Evaluates code.

getComputedStyle(element: HTMLElement): CSSStyleDeclaration

Returns an object containing the values of all CSS properties of an element.

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.

setTimeout(callback: () => void, delay?: number): NodeJS.Timeout

Sets a timer which executes a function once the timer expires.

clearTimeout(id: NodeJS.Timeout): void

Cancels a timeout previously established by calling setTimeout().

setInterval(callback: () => void, delay?: number): NodeJS.Timeout

Calls a function with a fixed time delay between each call.

clearInterval(id: NodeJS.Timeout): void

Cancels a timed repeating action which was previously established by a call to setInterval().

requestAnimationFrame(callback: (timestamp: number) => void): NodeJS.Timeout

Mock animation frames with timeouts.

cancelAnimationFrame(id: NodeJS.Timeout): void

Mock animation frames with timeouts.

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.