diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/static/js/changesettracker.js | 11 | ||||
-rw-r--r-- | src/static/js/html10n.js | 9 | ||||
-rw-r--r-- | src/static/js/pad.js | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/static/js/changesettracker.js b/src/static/js/changesettracker.js index dde4f5c7..8c4c1c21 100644 --- a/src/static/js/changesettracker.js +++ b/src/static/js/changesettracker.js @@ -57,6 +57,7 @@ function makeChangesetTracker(scheduler, apool, aceCallbacksProvider) { changeCallback(); } + catch(pseudoError) {} finally { changeCallbackTimeout = null; @@ -161,6 +162,16 @@ function makeChangesetTracker(scheduler, apool, aceCallbacksProvider) } else { + + // add forEach function to Array.prototype for IE8 + if (!('forEach' in Array.prototype)) { + Array.prototype.forEach= function(action, that /*opt*/) { + for (var i= 0, n= this.length; i<n; i++) + if (i in this) + action.call(that, this[i], i, this); + }; + } + // Get my authorID var authorId = parent.parent.pad.myUserInfo.userId; diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index e1c884cd..90d51e22 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -79,6 +79,15 @@ window.html10n = (function(window, document, undefined) { return -1; } } + + // fix Array.prototype.forEach in IE + if (!('forEach' in Array.prototype)) { + Array.prototype.forEach= function(action, that /*opt*/) { + for (var i= 0, n= this.length; i<n; i++) + if (i in this) + action.call(that, this[i], i, this); + }; + } /** * MicroEvent - to make any js object an event emitter (server or browser) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 504bc21e..9a42bccc 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -463,7 +463,7 @@ var pad = { { try { - doc.execCommand("BackgroundImageCache", false, true); + document.execCommand("BackgroundImageCache", false, true); } catch (e) {} |