Utility command to load an external script into the page specified by url.

Usage

Example

this.demoTest = function(client) {
  this.injectScript("{script-url}", function() {
    // we're all done here.
  });
};

Parameters

Name Type description
scriptUrl string

The script file url

id
Optional
string

Dom element id to be set on the script tag.

callback
Optional
function

Optional callback function to be called when the command finishes.

Returns

Type description
HTMLScriptElement

The newly created script tag.