Merge pull request #1751 from goldquest/dev_IE8-fix

Fixing IE8 errors
pull/1771/head
Marcel Klehr 2013-05-08 07:19:15 -07:00
commit 90d1598688
3 changed files with 21 additions and 1 deletions

View File

@ -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;

View File

@ -80,6 +80,15 @@ window.html10n = (function(window, document, undefined) {
}
}
// 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)
*/

View File

@ -463,7 +463,7 @@ var pad = {
{
try
{
doc.execCommand("BackgroundImageCache", false, true);
document.execCommand("BackgroundImageCache", false, true);
}
catch (e)
{}