MCPcopy
hub / github.com/NUKnightLab/TimelineJS3 / finish

Method finish

src/js/core/Load.js:88–108  ·  view source on GitHub ↗

Called when the current pending resource of the specified type has finished loading. Executes the associated callback (if any) and loads the next resource in the queue. @method finish @param {String} type resource type ('css' or 'js') @private

(type)

Source from the content-addressed store, hash-verified

86 @private
87 */
88 finish(type) {
89 var p = this.pending[type],
90 callback,
91 urls;
92
93 if (p) {
94 callback = p.callback;
95 urls = p.urls;
96
97 urls.shift();
98 this.pollCount = 0;
99
100 // If this is the last of the pending URLs, execute the callback and
101 // start the next request in the queue (if any).
102 if (!urls.length) {
103 callback && callback.call(p.context, p.obj);
104 this.pending[type] = null;
105 this.queue[type].length && this.load(type);
106 }
107 }
108 }
109
110 /**
111 Populates the <code>env</code> variable with user agent and feature test

Callers 3

loadMethod · 0.95
pollGeckoMethod · 0.95
pollWebKitMethod · 0.95

Calls 1

loadMethod · 0.95

Tested by

no test coverage detected