steal
Version:
Gets JavaScript.
22 lines (15 loc) • 542 B
Markdown
hooks.locate locate
StealJS.hooks
A loader hook that is used to identify the location (such as the URL) where a module can be fetched.
`locate(load)`
{load} load The *load* object associated with this module.
{Promise|String} the result
The **locate** hook is the second hook in the module loading lifecycle. It is used to determine from where a module can be fetched.
```
loader.locate({
name: "foo"
}).then(function(address){
address === "http://example.com/foo.js"
});
```
steal.