ssCore.Browser.setUserAgent

Set the user agent string that will be sent to the host when the browser requests a resource.


Availability:

First available in version 3.8 build 333.


Input Parameters:

userAgent - Value to be used for the user agent of the embedded browser. This can be enything you want. Set userAgent to an empty string to restore the default browser user agent.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Browser.setUserAgent( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Browser.setUserAgent( paramsObject );


Notes:

None.


Examples:

ssCore.init();
ssDefaults.synchronousCommands = true;
ssCore.Browser.setPosition ({x:0, y:50});
ssCore.Browser.setSize ({width:Stage.width, height:Stage.height-50});
ssCore.Browser.setUserAgent({userAgent:"Bob"});
ssCore.Browser.setURL({url:"http://www.whatsmyuseragent.com"});
ssCore.Browser.open();