UnsafeWindow

From GreaseSpot Wiki
Revision as of 14:26, 6 November 2006 by Arantius (talk | contribs) (→‎Examples)
Jump to navigationJump to search

This command can open certain security holes in your user script, and it is recommended to use this command sparingly.

Please be sure to read the entire article and understand it before using it in a script.


Syntax

unsafeWindow

Description

Userscripts can use this object to access document functions, variables and other elements in the document. unsafeWindow is a object wrapper for the entire document object.

Examples

unsafeWindow.document.title="Testing"
unsafeWindow.TestVarCreatedByDocument="Testing"
unsafeWindow.document.TestFunction("Test")