[API] Miscellaneous platform updates

Adds miscellaneous platform updates to include templates
via the RequireJS text plugin; to support modification of
asset paths; and to support priority order for gestures.

Supports integration of new API, #1124.
This commit is contained in:
Victor Woeltjen
2016-09-30 10:25:22 -07:00
parent 7439d949c4
commit a93f41f1c3
7 changed files with 41 additions and 14 deletions

View File

@ -42,11 +42,19 @@ define(
function addWorker(worker) {
var key = worker.key;
if (!workerUrls[key]) {
workerUrls[key] = [
worker.bundle.path,
worker.bundle.sources,
worker.scriptUrl
].join("/");
if (worker.scriptUrl) {
workerUrls[key] = [
worker.bundle.path,
worker.bundle.sources,
worker.scriptUrl
].join("/");
} else if (worker.scriptText) {
var blob = new Blob(
[worker.scriptText],
{type: 'application/javascript'}
);
workerUrls[key] = URL.createObjectURL(blob);
}
sharedWorkers[key] = worker.shared;
}
}