Skip to content

Commit

Permalink
clear cache on disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliette Pretot authored and jul-sh committed Dec 29, 2019
1 parent d9bb08e commit 0791607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MyAxeObserver.observe(document.getElementById('vue-header'))
MyAxeObserver.observe(document.getElementById('page-footer'))
```

To stop observing changes, call the `disconnect` method.
To stop observing changes, call the `disconnect` method. Clears the cache of previously reported violations.

```js
MyAxeObserver.disconnect()
Expand Down
1 change: 1 addition & 0 deletions src/AxeObserver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default class AxeObserver {
}
disconnect() {
this._mutationObserver.disconnect()
this.__alreadyReportedIncidents.clear()
}
async _auditNode(node) {
const response = await this._auditQueue.run(async () => {
Expand Down

0 comments on commit 0791607

Please sign in to comment.