Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BaseOptions

Hierarchy

Index

Properties

cookieJar?: CookieJar
includeNodeLocations?: boolean

includeNodeLocations preserves the location info produced by the HTML parser, allowing you to retrieve it with the nodeLocation() method (described below).

It defaults to false to give the best performance, and cannot be used with an XML content type since our XML parser does not support location info.

default

false

pretendToBeVisual?: boolean

jsdom does not have the capability to render visual content, and will act like a headless browser by default. It provides hints to web pages through APIs such as document.hidden that their content is not visible.

When the pretendToBeVisual option is set to true, jsdom will pretend that it is rendering and displaying content.

default

false

referrer?: string

referrer just affects the value read from document.referrer. It defaults to no referrer (which reflects as the empty string).

resources?: "usable" | ResourceLoader
runScripts?: "dangerously" | "outside-only"
userAgent?: string

userAgent affects the value read from navigator.userAgent, as well as the User-Agent header sent while fetching subresources.

default

Mozilla/5.0 (${process.platform}) AppleWebKit/537.36 (KHTML, like Gecko) jsdom/${jsdomVersion}

virtualConsole?: VirtualConsole

Methods

  • beforeParse(window: DOMWindow): void
  • Parameters

    • window: DOMWindow

    Returns void

Generated using TypeDoc