Fix: Failed to read cssRules property
This commit is contained in:
@@ -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) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user