[FIX] web_editor: correct check of property 'rules'
Port of PR #22603 from v9 to v10 See Issue #22517 (#22679)
This commit is contained in:
@@ -9,7 +9,7 @@ var getMatchedCSSRules = function (a) {
|
||||
var sheets = document.styleSheets;
|
||||
for(var i = sheets.length-1; i >= 0 ; i--) {
|
||||
var rules;
|
||||
if (sheets[i].rules) {
|
||||
if (sheets[i].hasOwnProperty('rules')) {
|
||||
rules = sheets[i].rules;
|
||||
} else {
|
||||
//try...catch because Firefox not able to enumerate document.styleSheets[].cssRules[] for cross-domain stylesheets.
|
||||
|
||||
@@ -8,4 +8,4 @@ declaration.
|
||||
|
||||
Signed,
|
||||
|
||||
Rémi CAZENAVE remi@le-filament.com https://github.com/remi-filament
|
||||
Rémi CAZENAVE 30716308+remi-filament@users.noreply.github.com https://github.com/remi-filament
|
||||
|
||||
Reference in New Issue
Block a user