From b8f81704884262c1061ce69921e9d898a312ed2d Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 3 Dec 2015 23:57:22 -0800 Subject: [PATCH] [Fix] In IE 6, `window.external` makes `Object.keys` throw. --- es5-shim.js | 3 ++- tests/spec/s-object.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/es5-shim.js b/es5-shim.js index 0858e171..143ae056 100644 --- a/es5-shim.js +++ b/es5-shim.js @@ -919,7 +919,8 @@ var blacklistedKeys = { $frames: true, $frameElement: true, $webkitIndexedDB: true, - $webkitStorageInfo: true + $webkitStorageInfo: true, + $external: true }; var hasAutomationEqualityBug = (function () { /* globals window */ diff --git a/tests/spec/s-object.js b/tests/spec/s-object.js index 0ec804ee..7bd4ea0d 100644 --- a/tests/spec/s-object.js +++ b/tests/spec/s-object.js @@ -140,7 +140,7 @@ describe('Object', function () { ifWindowIt('can serialize all objects on the `window`', function () { var has = Object.prototype.hasOwnProperty; var windowItemKeys, exception; - var blacklistedKeys = ['window', 'console', 'parent', 'self', 'frame', 'frames', 'frameElement']; + var blacklistedKeys = ['window', 'console', 'parent', 'self', 'frame', 'frames', 'frameElement', 'external']; if (supportsDescriptors) { Object.defineProperty(window, 'thrower', { configurable: true, get: function () { throw new RangeError('thrower!'); } }); }