Service workers tests
This commit is contained in:
parent
4e9273f35c
commit
1f3ef77349
@ -18,6 +18,9 @@ var debug = function (msg) { console.log(msg); };
|
|||||||
|
|
||||||
var init = function (client, cb) {
|
var init = function (client, cb) {
|
||||||
debug('SW INIT');
|
debug('SW INIT');
|
||||||
|
require.config({
|
||||||
|
waitSeconds: 600
|
||||||
|
});
|
||||||
|
|
||||||
require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) {
|
require(['/api/config?cb=' + (+new Date()).toString(16)], function (ApiConfig) {
|
||||||
if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); }
|
if (ApiConfig.requireConf) { require.config(ApiConfig.requireConf); }
|
||||||
@ -105,6 +108,7 @@ var init = function (client, cb) {
|
|||||||
Rpc._subscribeToMessenger(clientId);
|
Rpc._subscribeToMessenger(clientId);
|
||||||
}
|
}
|
||||||
if (data && data.state === "ALREADY_INIT") {
|
if (data && data.state === "ALREADY_INIT") {
|
||||||
|
self.store = data.returned;
|
||||||
return void cb(data.returned);
|
return void cb(data.returned);
|
||||||
}
|
}
|
||||||
self.store = data;
|
self.store = data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user