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

Connectors

Connectors

A connector is the interface between the hints and the website you are testing. It is responsible for loading the website and exposing all the information to webhint such as resources, network data, etc.

To configure a connector you need to update your .hintrc file to make it look like the following:

{
    "connector": {
        "name": "connectorName"
    }
}

Where connectorName is the name of the connector.

Official connectors and platform support

All the built-in connectors run in any of the supported platforms: Linux, macOS, and Windows. The only caveat is that, for the connector that you specify in the.hintrc file, you will need to have the browser the connector is for installed as webhint will not install it for you.

List of official connectors

The officially supported connectors that can be installed via npm are:

Configuration

connectors can be configured. Maybe you want to do a request with another userAgent, change some of the other defaults, etc. For that, you have to add the property options to your connector property with the values you want to modify:

"connector": {
    "name": "connectorName",
    "options": {}
}

Please check the dedicated page for each one to know more about the different options available for each connector.