-
-
Save domenic/7486049 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load.metadata = {}; | |
// Call the locate hook. | |
return loader.locate(name, { | |
name: load.name, | |
metadata: load.metadata | |
}).then(address => { | |
if (load.linkSets.size === 0) | |
return; | |
// This load still matters. Call the fetch hook. | |
load.address = address; | |
return loader.fetch({ | |
name: load.name, | |
metadata: load.metadata, | |
address: address | |
}); | |
}).then(source => { | |
if (load.linkSets.size === 0) | |
return; | |
// This load still matters. Call the translate hook. | |
return loader.translate({ | |
name: load.name, | |
metadata: load.metadata, | |
address: load.address, | |
source: source | |
}); | |
}).then(source => { | |
if (load.linkSets.size === 0) | |
return; | |
// This load still matters. Call the instantiate hook. | |
if (callFunction(std_Set_get_size, load.linkSets) === 0) | |
return; | |
load.source = source; | |
return loader.instantiate({ | |
name: load.name, | |
metadata: load.metadata, | |
address: load.address, | |
source: source | |
}); | |
}).then(InstantiateSucceeded).catch(LoadFailed); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment