kayle
Version:
Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.
20 lines • 643 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAllCss = void 0;
const getAllCss = async (config) => {
return await config.page.evaluate(() => {
return [...document.styleSheets]
.map((styleSheet) => {
try {
return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
}
catch (e) {
console.log("Access to stylesheet %s is denied.", styleSheet.href);
}
})
.filter(Boolean)
.join("\n");
});
};
exports.getAllCss = getAllCss;
//# sourceMappingURL=css.js.map