Skip to content
This repository was archived by the owner on Dec 31, 2022. It is now read-only.

Commit 98961f3

Browse files
committed
LABjs.next: inlining function for size sake
1 parent 36d9478 commit 98961f3

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

next/LAB.src.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@
9999
return any_scripts_ready;
100100
}
101101

102-
// is the chain group complete yet?
103-
function check_chain_group_complete(chain_group) {
104-
for (var i=0; i<chain_group.scripts.length; i++) {
105-
if (!chain_group.scripts[i].finished) return false;
106-
}
107-
chain_group.finished = true;
108-
return true;
109-
}
110-
111102
// creates a script load listener
112103
function create_script_load_listener(elem,registry_item,flag,onload) {
113104
elem.onload = elem.onreadystatechange = function() {
@@ -331,9 +322,13 @@
331322
/*!START_DEBUG*/if (chain_opts[_Debug]) log_msg("script execution finished: "+script_obj.real_src);/*!END_DEBUG*/
332323
script_obj.ready = script_obj.finished = true;
333324
script_obj.exec_trigger = null;
334-
if (check_chain_group_complete(chain_group)) {
335-
advance_exec_cursor();
325+
// check if chain group is all finished
326+
for (var i=0; i<chain_group.scripts.length; i++) {
327+
if (!chain_group.scripts[i].finished) return;
336328
}
329+
// chain_group is all finished if we get this far
330+
chain_group.finished = true;
331+
advance_exec_cursor();
337332
}
338333

339334
// main driver for executing each part of the chain

0 commit comments

Comments
 (0)