IE 11 issue - "Access Denied" in getOwnPropertyNames in es6.symbol.js
skevy opened this issue ยท 7 comments
In IE11, getOwnPropetyNames throws an "Access Denied" error in es6.symbol.js.
IE11 bug, see paulmillr/es6-shim#333 . I'll fix it.
Should be fixed in 0.9.14
, if it will not help in your case - report here.
Awesome. Thanks!
Hello,
I am getting this error on 2.4.1
.
I was able to fix it by changing getWindowNames()
in modules/_object-gpon-ext.js
from:
var getWindowNames = function(it){
try {
return gOPN(it);
} catch(e){
return windowNames.slice();
}
};
to
var getWindowNames = function(it){
try {
if (toString.call(it) == '[object Window]') {
return windowNames.slice();
} else {
return gOPN(it);
}
} catch(e){
return windowNames.slice();
}
};
I am unsure of the implications of this fix, since the issue only occurs in a very specific scenario (debugging an OfficeJS add-in written in Angular 4 in Visual Studio 2015).
Please advise if the above change has any unintended side-effects or not. If not, it would be great if you could include this in the next release of core-js.
Thank you.
Like @TheSamsterZA, I am still having this issue while debugging OfficeJS using Visual Studio 2017 Enterprise. core-js version 3.19.1. For now, TheSamsterZA's workaround does work.
@TheSamsterZA this fallback will break Object.getOwnPropertyNames(window)
and will return incorrect results after window
modification in cases and engines where it's not broken.
@PotatoSauceVFX could you provide additional info? The try
block does not work here and catch
does not catch the error?
@zloirock After looking more into this, it is not an issue with core-js. Visual Studio 17's JS debugging (used for developing Office Addons) was breaking on the Access Denied exception being thrown inside of the try. All that needed to be done was to disable this type of exception inside of the Exceptions Settings within VS as shown below.
Hopefully this helps someone.