summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-02-12 15:53:39 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-02-12 15:53:39 +0000
commit7a8973d40a51bc6917e1eb248600097dda03e0d2 (patch)
tree78f4e100020bc96863cea5dca4f831d2bb800945 /src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
parentbbeecf2b7811971371a1312a376f66a95d4db2ba (diff)
downloadscala-7a8973d40a51bc6917e1eb248600097dda03e0d2.tar.gz
scala-7a8973d40a51bc6917e1eb248600097dda03e0d2.tar.bz2
scala-7a8973d40a51bc6917e1eb248600097dda03e0d2.zip
[scaladoc] Fixes for IE 8 compatibility.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js')
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js b/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
index 51d8ae8cc3..4417f5b438 100644
--- a/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
+++ b/src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js
@@ -11,6 +11,11 @@ function Scheduler() {
this.name = name;
this.priority = priority;
}
+ this.work = function(fn, self, args) {
+ this.fn = fn;
+ this.self = self;
+ this.args = args;
+ }
this.addLabel = function(name, priority) {
var idx = 0;
while (idx < scheduler.queues.length && scheduler.labels[idx].priority <= priority) { idx = idx + 1; }
@@ -39,8 +44,8 @@ function Scheduler() {
scheduler.timeout = setTimeout(function() {
var work = scheduler.nextWork();
if (work != undefined) {
- //alert(work[0]);
- work[0].apply(work[1], work[2]);
+ if (work.args == undefined) { work.args = new Array(0); }
+ work.fn.apply(work.self, work.args);
doWork();
}
else {
@@ -51,7 +56,7 @@ function Scheduler() {
var idx = 0;
while (idx < scheduler.labels.length && scheduler.labels[idx].name != labelName) { idx = idx + 1; }
if (idx < scheduler.queues.length && scheduler.labels[idx].name == labelName) {
- scheduler.queues[idx].push([fn, self, args]);
+ scheduler.queues[idx].push(new scheduler.work(fn, self, args));
if (scheduler.timeout == undefined) doWork();
}
else throw("queue for add is non existant");