|
|
@@ -124,15 +124,11 @@ this.docHelper = this.docHelper || (() => {
|
|
|
doc.body.appendChild(tempStyleElement);
|
|
|
stylesheet = tempStyleElement.sheet;
|
|
|
tempStyleElement.remove();
|
|
|
- } catch (error) {
|
|
|
- /* ignored */
|
|
|
- }
|
|
|
- if (!stylesheet || stylesheet.cssRules.length != styleElement.sheet.cssRules.length) {
|
|
|
- try {
|
|
|
+ if (!stylesheet || stylesheet.cssRules.length != styleElement.sheet.cssRules.length) {
|
|
|
contents[styleIndex] = Array.from(styleElement.sheet.cssRules).map(rule => rule.cssText).join("\n");
|
|
|
- } catch (error) {
|
|
|
- /* ignored */
|
|
|
}
|
|
|
+ } catch (error) {
|
|
|
+ /* ignored */
|
|
|
}
|
|
|
});
|
|
|
return contents;
|