зеркало из https://github.com/mozilla/brackets.git
Merge pull request #452 from humphd/ie-access-denied-exception
Deal with IE throwing 'Access Denied' error (-2147024891) when accessing stylesheet properties
This commit is contained in:
Коммит
76e3e4d903
|
@ -68,10 +68,11 @@
|
|||
|
||||
// Deal with Firefox's SecurityError when accessing sheets
|
||||
// from other domains. Chrome will safely return `undefined`.
|
||||
// IE gives an "Access Denied" error (-2147024891), which we also need to catch.
|
||||
try {
|
||||
cssRules = sheet.cssRules;
|
||||
} catch (e) {
|
||||
if (e.name !== "SecurityError") {
|
||||
if (!(e.name === "SecurityError" || e.number === -2147024891)) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче