I have some code I inherited from my job, and it uses an api call from head.js :
head.js( { 'application' : 'someurl.com/foo.js' });
Does this register the javascript asset as application
, so when I call
head.load( 'application' );
the right behavior will happen? I couldn't find this method in the head.js api page, nor in a google search.
head.js( { 'application' : 'someurl.com/foo.js' });
- means that you add label to loading some foo.js file then you can use ready
function to callback a function that do some stuff. For example:
// Labels are usually used in conjuntion with: head.ready()
head.ready("application", function() {
// do something
});
head.load( 'application' );
- will tries to load application file for root folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.