Skip to content

Commit ba488b0

Browse files
committed
fix: Add delay 500 to first check
1 parent 02b7b0d commit ba488b0

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Diff for: docs/guide/options.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Learn more about [Axe-core runtime options](https://github.com/dequelabs/axe-cor
7878

7979
| Type | Default |
8080
| -------- | -------- |
81-
| Number | `0` |
81+
| Number | `500` |
8282

8383
Used only to delay the first check.
8484

Diff for: src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ export default function install (Vue, options) {
4444
clear(true, options)
4545
}
4646
})
47+
48+
// First check
49+
setTimeout(() => draf(() => checkAndReport(options, document)), options.delay)
4750
}

Diff for: src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const draf = (cb) => requestAnimationFrame(() => requestAnimationFrame(cb
55
export const defaultOptions = {
66
auto: true,
77
clearConsoleOnUpdate: false,
8-
delay: 0,
8+
delay: 500,
99
config: {
1010
branding: {
1111
application: 'vue-axe'

0 commit comments

Comments
 (0)