diff --git a/lib/debug/asserts.js b/lib/debug/asserts.js index 143a7923c..1cf7866eb 100644 --- a/lib/debug/asserts.js +++ b/lib/debug/asserts.js @@ -49,6 +49,7 @@ shaka.asserts.patchAssert_ = function() { if (!assert) { console.assert = function() {}; } else if (!assert.bind) { + // IE 9 does not provide a .bind for the built-in console functions. console.assert = function() { assert.apply(console, arguments); } diff --git a/lib/debug/log.js b/lib/debug/log.js index 97571785c..fdb117cee 100644 --- a/lib/debug/log.js +++ b/lib/debug/log.js @@ -76,6 +76,7 @@ shaka.log.patchConsole_ = function(logName) { if (!logFunction) { console[logName] = nop; } else if (!logFunction.bind) { + // IE 9 does not provide a .bind for the built-in logging functions. console[logName] = function() { logFunction.apply(console, arguments); } diff --git a/support.js b/support.js index 745d934ba..0b3550b2b 100644 --- a/support.js +++ b/support.js @@ -304,6 +304,9 @@ if (async.length) { } function onLoaded(fn) { + // IE 9 fires DOMContentLoaded, and enters the "interactive" + // readyState, before document.body has been initialized, so wait + // for window.load if (document.readyState == "loading" || document.readyState == "interactive") { window.addEventListener('load', fn);