importScripts method

Loads and executes one or more scripts into the worker specified by a URL.

Syntax

var retval = WorkerGlobalScope.importScripts(urls);

Parameters

urls [in]

Type: DOMString

Return value

Type: HRESULT

This method can return one of these values.

S_OK

Remarks

The URL that is loaded must resolve according to the WorkerLocation of the worker. More than one script can be loaded in a sequence of URLs. The loading and executing of scripts is synchronous. If any script throws an exception, subsequent scripts will not load.

See also

WorkerGlobalScope

 

 

Show:
© 2014 Microsoft