class EnvironmentOptions extends Object
JsDom Configuration Options
- Annotations
- @RawJSType() @ScalaJSDefined()
- Alphabetic
- By Inheritance
- EnvironmentOptions
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
EnvironmentOptions(html: UndefOr[String] = js.undefined, file: UndefOr[String] = js.undefined, url: UndefOr[String] = js.undefined, scripts: UndefOr[Array[String]] = js.undefined, src: UndefOr[Array[String]] = js.undefined, cookieJar: UndefOr[CookieJar] = js.undefined, parsingMode: UndefOr[String] = js.undefined, referrer: UndefOr[String] = js.undefined, cookie: UndefOr[String] = js.undefined, headers: UndefOr[String] = js.undefined, userAgent: UndefOr[String] = js.undefined, features: UndefOr[String] = js.undefined, resourceLoader: UndefOr[String] = js.undefined, done: Function2[Error, JsDomWindowWithJQuery, Any] = null, concurrentNodeIterators: UndefOr[String] = js.undefined, virtualConsole: UndefOr[VirtualConsole] = js.undefined, pool: Any = js.undefined, agent: UndefOr[String] = js.undefined, agentClass: UndefOr[String] = js.undefined, agentOptions: Any = js.undefined, strictSSL: UndefOr[Boolean] = js.undefined, proxy: UndefOr[String] = js.undefined)
- html
a HTML fragment
- file
a file which jsdom will load HTML from; the resulting document's URL will be a file:// URL.
- url
sets the resulting document's URL, which is reflected in various properties like document.URL and location.href, and is also used for cross-origin request restrictions. If config.html and config.file are not provided, jsdom will load HTML from this URL.
- src
an array of JavaScript strings that will be evaluated against the resulting document. Similar to scripts, but it accepts JavaScript instead of paths/URLs.
- cookieJar
cookie jar which will be used by document and related resource requests. Can be created by jsdom.createCookieJar() method. Useful to share cookie state among different documents as browsers does.
- parsingMode
either "auto", "html", or "xml". The default is "auto", which uses HTML behavior unless config.url responds with an XML Content-Type, or config.file contains a filename ending in .xml or .xhtml. Setting to "xml" will attempt to parse the document as an XHTML document. (jsdom is currently only OK at doing that.)
- referrer
the new document will have this referrer.
- cookie
manually set a cookie value, e.g. 'key=value; expires=Wed, Sep 21 2011 12:00:00 GMT; path=/'. Accepts cookie string or array of cookie strings.
- headers
an object giving any headers that will be used while loading the HTML from config.url, if applicable.
- userAgent
the user agent string used in requests; defaults to Node.js (#process.platform#; U; rv:#process.version#)
- features
see Flexibility section below. Note: the default feature set for jsdom.env does not include fetching remote JavaScript and executing it. This is something that you will need to carefully enable yourself.
- resourceLoader
a function that intercepts subresource requests and allows you to re-route them, modify, or outright replace them with your own content. More below.
- done
config.onload, config.created: see below.
- concurrentNodeIterators
the maximum amount of NodeIterators that you can use at the same time. The default is 10; setting this to a high value will hurt performance.
- virtualConsole
a virtual console instance that can capture the window’s console output; see the "Capturing Console Output" examples.
- pool
an object describing which agents to use for the requests; defaults to { maxSockets: 6 }, see request module for more details.
- agent
http(s).Agent instance to use
- agentClass
alternatively specify your agent's class name
- agentOptions
the agent options; defaults to { keepAlive: true, keepAliveMsecs: 115000 }, see http api for more details.
- strictSSL
if true, requires SSL certificates be valid; defaults to true, see request module for more details.
- proxy
a URL for a HTTP proxy to use for the requests.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var agent: UndefOr[String]
- var agentClass: UndefOr[String]
- var agentOptions: Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- var concurrentNodeIterators: UndefOr[String]
- var cookie: UndefOr[String]
- var cookieJar: UndefOr[CookieJar]
- var done: Function2[Error, JsDomWindowWithJQuery, Any]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var features: UndefOr[String]
- var file: UndefOr[String]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- var headers: UndefOr[String]
- var html: UndefOr[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- var parsingMode: UndefOr[String]
- var pool: Any
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- var proxy: UndefOr[String]
- var referrer: UndefOr[String]
- var resourceLoader: UndefOr[String]
- var scripts: UndefOr[Array[String]]
- var src: UndefOr[Array[String]]
- var strictSSL: UndefOr[Boolean]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- var url: UndefOr[String]
- var userAgent: UndefOr[String]
-
def
valueOf(): Any
- Definition Classes
- Object
- var virtualConsole: UndefOr[VirtualConsole]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )