Class

io.scalajs.npm.jsdom

EnvironmentOptions

Related Doc: package jsdom

Permalink

class EnvironmentOptions extends Object

JsDom Configuration Options

Annotations
@ScalaJSDefined() @RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EnvironmentOptions
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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)

    Permalink

    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

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var agent: UndefOr[String]

    Permalink

    http(s).Agent instance to use

  5. var agentClass: UndefOr[String]

    Permalink

    alternatively specify your agent's class name

  6. var agentOptions: Any

    Permalink

    the agent options; defaults to { keepAlive: true, keepAliveMsecs: 115000 }, see http api for more details.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. var concurrentNodeIterators: UndefOr[String]

    Permalink

    the maximum amount of NodeIterators that you can use at the same time.

    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.

  10. var cookie: UndefOr[String]

    Permalink

    manually set a cookie value, e.g.

    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.

  11. var cookieJar: UndefOr[CookieJar]

    Permalink

    cookie jar which will be used by document and related resource requests.

    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.

  12. var done: Function2[Error, JsDomWindowWithJQuery, Any]

    Permalink

    config.onload, config.created: see below.

  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. var features: UndefOr[String]

    Permalink

    see Flexibility section below.

    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.

  16. var file: UndefOr[String]

    Permalink

    a file which jsdom will load HTML from; the resulting document's URL will be a file:// URL.

  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. var headers: UndefOr[String]

    Permalink

    an object giving any headers that will be used while loading the HTML from config.url, if applicable.

  22. var html: UndefOr[String]

    Permalink

    a HTML fragment

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. var parsingMode: UndefOr[String]

    Permalink

    either "auto", "html", or "xml".

    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.)

  29. var pool: Any

    Permalink

    an object describing which agents to use for the requests; defaults to { maxSockets: 6 }, see request module for more details.

  30. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  31. var proxy: UndefOr[String]

    Permalink

    a URL for a HTTP proxy to use for the requests.

  32. var referrer: UndefOr[String]

    Permalink

    the new document will have this referrer.

  33. var resourceLoader: UndefOr[String]

    Permalink

    a function that intercepts subresource requests and allows you to re-route them, modify, or outright replace them with your own content.

    a function that intercepts subresource requests and allows you to re-route them, modify, or outright replace them with your own content. More below.

  34. var scripts: UndefOr[Array[String]]

    Permalink
  35. var src: UndefOr[Array[String]]

    Permalink

    an array of JavaScript strings that will be evaluated against the resulting document.

    an array of JavaScript strings that will be evaluated against the resulting document. Similar to scripts, but it accepts JavaScript instead of paths/URLs.

  36. var strictSSL: UndefOr[Boolean]

    Permalink

    if true, requires SSL certificates be valid; defaults to true, see request module for more details.

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. var url: UndefOr[String]

    Permalink

    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.

    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.

  41. var userAgent: UndefOr[String]

    Permalink

    the user agent string used in requests; defaults to Node.js (#process.platform#; U; rv:#process.version#)

  42. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  43. var virtualConsole: UndefOr[VirtualConsole]

    Permalink

    a virtual console instance that can capture the window’s console output; see the "Capturing Console Output" examples.

  44. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped