Dev: Revert to use try catch #67
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import {each, has} from '../lib/util';
|
import {each} from '../lib/util';
|
||||||
|
|
||||||
function formatStyle(style)
|
function formatStyle(style)
|
||||||
{
|
{
|
||||||
@@ -45,9 +45,15 @@ export default class CssStore
|
|||||||
let ret = [];
|
let ret = [];
|
||||||
|
|
||||||
each(document.styleSheets, (styleSheet) =>
|
each(document.styleSheets, (styleSheet) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// Started with version 64, Chrome does not allow cross origin script to access this property.
|
// Started with version 64, Chrome does not allow cross origin script to access this property.
|
||||||
if (!has(styleSheet, 'cssRules')) return;
|
if (!styleSheet.cssRules) return;
|
||||||
|
} catch (e)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
each(styleSheet.cssRules, (cssRule) =>
|
each(styleSheet.cssRules, (cssRule) =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user