Разборка с сохранением

This commit is contained in:
2019-10-04 13:13:30 +03:00
parent 4f3186618c
commit 6001c88a22
4 changed files with 180 additions and 5 deletions

View File

@@ -36,6 +36,11 @@ function TextEncoderLite(){}function TextDecoderLite(){}(function(){"use strict"
};
};
murom.start = function()
{
console.log("Override 'murom.start()' in any of the modules to be notified when all modules are loaded");
};
murom.loadModules = function()
{
// Skip `0` module because it's us.
@@ -61,6 +66,8 @@ murom.loadModules = function()
}
}
}
murom.start();
};
murom.loadIndexedDBModules = function(completionHandler)
@@ -72,6 +79,11 @@ murom.loadIndexedDBModules = function(completionHandler)
if (modules)
{
murom.modules = modules;
console.log("Modules have been loaded from IndexedDB");
}
if (error)
{
console.log("ERROR Getting modules from IndexedDB: '" + error + "'");
}
// Continue.
completionHandler();
@@ -82,3 +94,4 @@ murom.installLocalForage();
murom.installUnicodeBase64();
// IndexedDB modules override HTML ones.
murom.loadIndexedDBModules(murom.loadModules);