Add a rule that allows or denies URLs in the embedded browser.


First available in version 3.0 build 2039.

Input Parameters:

type - The rule type that determines whether URLs matching the pattern argument will be allowed. Valid values include: allow and deny.

pattern - A string to match against URLs. You may use * as a wildcard to match 0 or more characters in the string.

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.addRule( 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.addRule( paramsObject );


Before calling Browser.addRule, the browser may navigate to any URL without restriction.

If the browser tries to navigate to a URL that has not been added with Browser.addRule, or does not match an added pattern, the navigation will fail.


This example sets a rule that denies access to any URL with "" in it.

ssCore.Browser.addRule({pattern:'**', type:'deny'});