mirror of
https://github.com/status-im/re-natal.git
synced 2025-01-27 21:04:46 +00:00
wait until whole app is loaded
This commit is contained in:
parent
3ff63a6814
commit
de04f0ba94
@ -187,16 +187,16 @@ function assertRootElExists(platform) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadApp(platform, devHost, onLoadCb) {
|
function loadApp(platform, devHost, onLoadCb) {
|
||||||
// serverHost = devHost;
|
|
||||||
var fileBasePath = serverBaseUrl((isChrome() ? "localhost" : devHost)) + "/" + config.basePath + platform;
|
var fileBasePath = serverBaseUrl((isChrome() ? "localhost" : devHost)) + "/" + config.basePath + platform;
|
||||||
|
|
||||||
// callback when app is ready to get the reloadable component
|
// callback when app is ready to get the reloadable component
|
||||||
var mainJs = '/env/' + platform + '/main.js';
|
var mainJs = '/figwheel/connect/build_' + platform + '.js';
|
||||||
evalListeners.push(function (url) {
|
evalListeners.push(function (url) {
|
||||||
if (url.indexOf(mainJs) > -1) {
|
if (url.indexOf(mainJs) > -1) {
|
||||||
assertRootElExists(platform);
|
assertRootElExists(platform);
|
||||||
onLoadCb(env[platform].main.root_el);
|
onLoadCb(env[platform].main.root_el);
|
||||||
console.info('Done loading Clojure app');
|
console.info('Done loading Clojure app');
|
||||||
|
// TODO remove listener
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user