Skip to content

Commit

Permalink
docs: add list of required globals (#1622)
Browse files Browse the repository at this point in the history
  • Loading branch information
straker committed Jun 7, 2019
1 parent ce20fbf commit a36f72a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ The axe API can be used as part of a broader process that is performed on many,

The axe APIs are provided in the javascript file axe.js. It must be included in the web page under test. Parameters are sent as javascript function parameters. Results are returned in JSON format.

### Required Globals

Axe requires a handful of global variables and interfaces to be available in order to run. See the [jsdom example](https://github.com/dequelabs/axe-core/blob/develop/doc/examples/jsdom/test/a11y.js) for how to set these up in a non-browser environment.

- `window`
- `document`
- [`navigator`](https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator)
- [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node)
- [`NodeList`](https://developer.mozilla.org/en-US/docs/Web/API/NodeList)
- [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element)
- [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/Document)

### Full API Reference for Developers

For a full listing of API offered by axe, clone the repository and run `npm run api-docs`. This generates `jsdoc` documentation under `doc/api` which can be viewed using the browser.
Expand Down

0 comments on commit a36f72a

Please sign in to comment.