UnsafeWindow

From GreaseSpot Wiki
Revision as of 14:30, 6 November 2006 by Arantius (talk | contribs) (lowercase title name template addition)
Jump to navigationJump to search

Template:Lowercase

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")