Home

Library goog.net.jsloader

Function Summary
cancel_()

Cancels a given request.

cleanup_(?Node scriptNode, boolean removeScriptNode, ?number= opt_timeout)

Removes the script node and the timeout.

getScriptParentElement_(!HTMLDocument doc) ⇒ !Element

Gets the DOM element under which we should add new script elements. How? Take the first head element, and if not found take doc.documentElement, which always exists.

load(string uri, ?goog.net.jsloader.Options= opt_options) ⇒ !goog.async.Deferred

Loads and evaluates a JavaScript file. When the script loads, a user callback is called. It is the client's responsibility to verify that the script ran successfully.

loadAndVerify(string uri, string verificationObjName, ?goog.net.jsloader.Options options) ⇒ !goog.async.Deferred

Loads a JavaScript file and verifies it was evaluated successfully, using a verification object. The verification object is set by the loaded JavaScript at the end of the script. We verify this object was set and return its value in the success callback. If the object is not defined we trigger an error callback.

loadMany(?Array.<string> uris, ?goog.net.jsloader.Options= opt_options)

Loads and evaluates the JavaScript files at the specified URIs, in order.