Created
October 23, 2022 07:59
-
-
Save mihai-vlc/c0492591b181164b8b764bcf1a0d8a85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// restore the native console object | |
var i = document.createElement('iframe'); | |
i.style.display = 'none'; | |
document.body.appendChild(i); | |
window.console = i.contentWindow.console; | |
var script = document.createElement("script"); | |
script.src = "https://unpkg.com/[email protected]/axe.min.js"; | |
script.onload = function () { | |
axe | |
.run() | |
.then(results => { | |
console.error("results violations", results.violations) | |
}) | |
.catch(err => { | |
console.error('Error:', err.message); | |
}); | |
}; | |
document.head.appendChild(script); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment