A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/27392408/head-js-js-method below:

javascript - Head.js `.js()` method

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.

asked Dec 10, 2014 at 2:31

Athan ClarkAthan Clark

3,98822 gold badges2424 silver badges4545 bronze badges

2

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.

answered Jan 13, 2016 at 12:20

alx larkalx lark

86411 gold badge88 silver badges2424 bronze badges

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4