Skip to content

Commit

Permalink
replace with async
Browse files Browse the repository at this point in the history
  • Loading branch information
kodster28 committed Aug 30, 2023
1 parent cda6bc9 commit e07860b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/accessibility-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ myEmitter.setMaxListeners(20); // Increase

const sitemapUrl = 'https://developers.cloudflare.com/sitemap.xml';

function processUrl(url) {
pa11y(url).then((results) => {
console.log(results)
});
async function processUrl(url) {
try {
const results = await pa11y(url);
console.log(results)
} catch (error) {
console.log("error")
}
}

axios.get(sitemapUrl)
Expand Down

0 comments on commit e07860b

Please sign in to comment.