Skip to content

Commit

Permalink
fix(typescript): allow passing a NodeList to ElementContext (#3161)
Browse files Browse the repository at this point in the history
As per the spec, the context parameter can be passed one of the following:

> A `NodeList` such as returned by `document.querySelectorAll`.

Source: https://www.deque.com/axe/core-documentation/api-documentation/#context-parameter
  • Loading branch information
kaelig authored and straker committed Oct 18, 2021
1 parent 69b2e33 commit 5f2e517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion axe.d.ts
Expand Up @@ -56,7 +56,7 @@ declare namespace axe {

type RunCallback = (error: Error, results: AxeResults) => void;

type ElementContext = Node | string | ContextObject;
type ElementContext = Node | NodeList | string | ContextObject;

interface TestEngine {
name: string;
Expand Down

0 comments on commit 5f2e517

Please sign in to comment.