This site uses cookies for analytics. By continuing to browse this site, you agree to this use.

jsdom

jsdom (@hint/connector-jsdom)

A connector to use jsdom in webhint.

Installation

First, you need to install webhint:

npm install hint

Then, install the new connector:

npm install @hint/connector-jsdom

Known issues

  • It will not send the events for:

    • element::#document
    • element::#comment

Usage

Configure the connector name in your .hintrc configuration file:

{
    "connector": {
        "name": "jsdom"
    },
    ...
}

Options

The set of settings supported by jsdom connector are:

  • ignoreHTTPSError (boolean): Indicates if errors with certificates should be ignored. Use this when checking self-signed certificates. It is false by default.
  • waitFor (number): time in milliseconds the connector will wait after the site is ready before starting the DOM traversing and stop listening to any network request. By default, it will wait until the network is somehow “quiet” even though more requests could be processed after DOM traversing. Default is 5000.
{
    "connector": {
        "name": "jsdom",
        "options": {
            "ignoreHTTPSErrors": false,
            "waitFor": 10000
        }
    },
    ...
}

Further Reading