1
0
mirror of synced 2025-12-11 00:48:21 +08:00

Fix: Failed to read cssRules property

This commit is contained in:
redhoodsu
2018-03-14 20:18:11 +08:00
parent 8b885df2a4
commit 2a6b4d81d7

View File

@@ -46,7 +46,14 @@ export default class CssStore
each(document.styleSheets, (styleSheet) =>
{
if (!styleSheet.cssRules) return;
try
{
// Started with version 64, Chrome does not allow cross origin script to access this property.
if (!styleSheet.cssRules) return;
} catch (e)
{
return;
}
each(styleSheet.cssRules, (cssRule) =>
{