...
To use this feature, a gadget must require(or optional) the feature like so:
Code Block | ||||
---|---|---|---|---|
| ||||
<Optional feature="shared-script-frame"> <Param name="view">script</Param> </Optional> |
...
Gadgets can request a reference to the shared script frame:
Code Block | ||||
---|---|---|---|---|
| ||||
gadgets.util.registerOnLoadHandler(function() { gadgets.script.getScriptFrame(function(scriptFrame) { // Do something with the script frame here. }; }); |