@axe-core/playwright
Advanced tools
Comparing version 4.9.1-8644fbd.0 to 4.9.1-8bf551b.0
@@ -264,6 +264,18 @@ "use strict"; | ||
*/ | ||
async inject(frames) { | ||
async inject(frames, shouldThrow) { | ||
for (const iframe of frames) { | ||
await iframe.evaluate(await this.script()); | ||
await iframe.evaluate(await this.axeConfigure()); | ||
const race = new Promise((_, reject) => { | ||
setTimeout(() => { | ||
reject(new Error("Script Timeout")); | ||
}, 1e3); | ||
}); | ||
const evaluate = iframe.evaluate(this.script()); | ||
try { | ||
await Promise.race([evaluate, race]); | ||
await iframe.evaluate(await this.axeConfigure()); | ||
} catch (err) { | ||
if (shouldThrow) { | ||
throw err; | ||
} | ||
} | ||
} | ||
@@ -322,3 +334,3 @@ } | ||
if (childFrame) { | ||
await this.inject([childFrame]); | ||
await this.inject([childFrame], true); | ||
childResults = await this.runPartialRecursive( | ||
@@ -325,0 +337,0 @@ childFrame, |
@@ -264,6 +264,18 @@ "use strict"; | ||
*/ | ||
async inject(frames) { | ||
async inject(frames, shouldThrow) { | ||
for (const iframe of frames) { | ||
await iframe.evaluate(await this.script()); | ||
await iframe.evaluate(await this.axeConfigure()); | ||
const race = new Promise((_, reject) => { | ||
setTimeout(() => { | ||
reject(new Error("Script Timeout")); | ||
}, 1e3); | ||
}); | ||
const evaluate = iframe.evaluate(this.script()); | ||
try { | ||
await Promise.race([evaluate, race]); | ||
await iframe.evaluate(await this.axeConfigure()); | ||
} catch (err) { | ||
if (shouldThrow) { | ||
throw err; | ||
} | ||
} | ||
} | ||
@@ -322,3 +334,3 @@ } | ||
if (childFrame) { | ||
await this.inject([childFrame]); | ||
await this.inject([childFrame], true); | ||
childResults = await this.runPartialRecursive( | ||
@@ -325,0 +337,0 @@ childFrame, |
{ | ||
"name": "@axe-core/playwright", | ||
"version": "4.9.1-8644fbd.0+8644fbd", | ||
"version": "4.9.1-8bf551b.0+8bf551b", | ||
"description": "Provides a method to inject and analyze web pages using axe", | ||
@@ -54,6 +54,6 @@ "contributors": [ | ||
"dependencies": { | ||
"axe-core": "~4.9.0" | ||
"axe-core": "~4.9.1" | ||
}, | ||
"devDependencies": { | ||
"@playwright/test": "^1.34.3", | ||
"@playwright/test": "^1.44.0", | ||
"@types/chai": "^4.3.3", | ||
@@ -96,3 +96,3 @@ "@types/express": "^4.17.14", | ||
}, | ||
"gitHead": "8644fbd2d2b407c68b5ff3bd7b8368c6c173e355" | ||
"gitHead": "8bf551b635aaec8911d24bec54c4dc6aa0ad1ad2" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
63038
1229
Updatedaxe-core@~4.9.1