1
0
mirror of synced 2025-12-10 08:28:08 +08:00

Dev: Revert to use try catch #67

This commit is contained in:
surunzi
2018-05-27 19:51:42 +08:00
parent e6342d9b3f
commit 8319e5db9f

View File

@@ -1,4 +1,4 @@
import {each, has} from '../lib/util';
import {each} from '../lib/util';
function formatStyle(style)
{
@@ -46,8 +46,14 @@ export default class CssStore
each(document.styleSheets, (styleSheet) =>
{
// Started with version 64, Chrome does not allow cross origin script to access this property.
if (!has(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) =>
{