The question came up on the Microsoftgadgets forum:
Is there an easy way to include one .js file within another?
Web.Utility.Script.attachScript(script, document.body, null);
var r = Web.Network.createRequest(Web.Network.Type.Script, jsToAddUrl, null, OnScript);
OnScript is the asynchronous callback that handles the Response of the Request. The arguments for attachScript causes the script to be attached to the document Body. The third argument is a placeholder for a callback method to respond once the script has been attached.
In order to get the script we create a request of type Script, passing the requested js file’s url and the callback method to handle the request. The third argument is an open slot for an object used to persist store between requests.