Fix IE8 issue

This commit is contained in:
Fabian Jakobs 2010-11-08 09:57:46 +01:00
commit fdb75c0cb9

View file

@ -5,8 +5,8 @@
* @license LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt> * @license LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt>
* @author Fabian Jakobs <fabian AT ajax DOT org> * @author Fabian Jakobs <fabian AT ajax DOT org>
*/ */
require.def("ace/RenderLoop", function() { require.def("ace/RenderLoop", ["ace/lib/event"], function(event) {
var RenderLoop = function(onRender) { var RenderLoop = function(onRender) {
this.onRender = onRender; this.onRender = onRender;
this.pending = false; this.pending = false;
@ -37,12 +37,12 @@ var RenderLoop = function(onRender) {
this.setTimeoutZero = function(callback) { this.setTimeoutZero = function(callback) {
if (!this.attached) { if (!this.attached) {
var _self = this; var _self = this;
window.addEventListener("message", function(e) { event.addListener(window, "message", function(e) {
if (e.source == window && _self.callback && e.data == _self.messageName) { if (e.source == window && _self.callback && e.data == _self.messageName) {
e.stopPropagation(); e.stopPropagation();
_self.callback(); _self.callback();
} }
}, false); });
this.attached = true; this.attached = true;
} }
this.callback = callback; this.callback = callback;