See the dojox/secure/capability reference documentation for more information.
pass in the text of a script. If it passes and it can be eval'ed, it should be safe. Note that this does not do full syntax checking, it relies on eval to reject invalid scripts. There are also known false rejections:
Parameter | Type | Description |
---|---|---|
script | string | the script to execute |
safeLibraries | Array | The safe libraries that can be called (the functions can not be access/modified by the untrusted code, only called) |
safeGlobals | Object | These globals can be freely interacted with by the untrusted code |