Разборка с сохранением
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user