Greasemonkey Manual:Environment: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
{{Greasemonkey Manual TOC}}
[http://library.cshl.edu/wp/vb/member.php?u=1380 verizon ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=163 cheap adipex] [http://students.hsc.unt.edu/housing/item.cfm?type=2859 meridia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=209 samsung ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=170 free cingular ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=78 clomid online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30298 cheap lisinopril] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=74 cheap carisoprodol] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=352 paxil online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=227 ericsson ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1386 free mono ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=69 albuterol online] [http://wc1.worldcrossing.com/WebX/.1de60a12 ericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=171 ambien online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=188 levitra online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=83 cheap didrex] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30358 free midi ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2879 clomid online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=186 cheap lipitor] [http://news.engin.brown.edu/forums/thread-view.asp?tid=215 sagem ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=346 cheap meridia] [http://students.hsc.unt.edu/housing/item.cfm?type=2923 free sony ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30237 valium online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=171 clomid online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=184 hoodia online] [http://wc1.worldcrossing.com/WebX/.1de60a1b music ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30264 hydrocodone] [http://wc1.worldcrossing.com/WebX/.1de609db but adipex] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30321 cheap hgh] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=90 cheap hgh] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30263 order levitra] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=133 tracfone ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=226 free sony ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=117 propecia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=165 cheap vicodin] [http://library.cshl.edu/wp/vb/member.php?u=1340 soma online] [http://students.hsc.unt.edu/housing/item.cfm?type=2909 free verizon ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30252 meridia online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=221 order vicodin] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30347 verizon ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1354 cheap alprazolam] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30330 nokia ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2903 qwest ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a26 free sharp ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30348 polyphonic ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=345 cheap viagra] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=239 sildenafil online] [http://students.hsc.unt.edu/housing/item.cfm?type=2876 didrex online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=142 wellbutrin] [http://students.hsc.unt.edu/housing/item.cfm?type=2872 cyclobenzaprine online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30333 funny ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a00 rivotril online] [http://library.cshl.edu/wp/vb/member.php?u=1356 paxil online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30357 free sharp ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=123 free sagem ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30268 xenical online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=92 cheap hydrocodone] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=100 cheap lortab] [http://students.hsc.unt.edu/housing/item.cfm?type=2850 phentermine online] [http://students.hsc.unt.edu/housing/item.cfm?type=2869 cheap lorazepam] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=116 free polyphonic ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1361 order xenical] [http://library.cshl.edu/wp/vb/member.php?u=1362 buy wellbutrin] [http://wc1.worldcrossing.com/WebX/.1de60a2b cheap ultracet] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=113 paxil online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30279 ultracet online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=229 jazz ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2863 alprazolam online] [http://wc1.worldcrossing.com/WebX/.1de609f4 free mono ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1353 vicodin] [http://students.hsc.unt.edu/housing/item.cfm?type=2880 cheap albuterol] [http://wc1.worldcrossing.com/WebX/.1de609eb free funny ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=181 free free ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2887 pharmacy online online] [http://library.cshl.edu/wp/vb/member.php?u=1364 cheap nexium] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=222 vigrx online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=166 buy ativan] [http://library.cshl.edu/wp/vb/member.php?u=1381 free polyphonic ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=180 flexeril online] [http://wc1.worldcrossing.com/WebX/.1de609fd free punk ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=102 free midi ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a2c but ultram] [http://students.hsc.unt.edu/housing/item.cfm?type=2853 fioricet online] [http://students.hsc.unt.edu/housing/item.cfm?type=2899 tracfone ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=185 hydrocodone online] [http://library.cshl.edu/wp/vb/member.php?u=1378 free sprint ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1350 order meridia] [http://news.engin.brown.edu/forums/thread-view.asp?tid=152 cheap valium] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=208 cheap phentermine] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=349 cheap vicodin] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=77 free cingular ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a0c buy wellbutrin] [http://students.hsc.unt.edu/housing/item.cfm?type=2860 adipex online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=223 midi ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=126 cheap sildenafil] [http://library.cshl.edu/wp/vb/member.php?u=1383 free sagem ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=197 flexeril online] [http://students.hsc.unt.edu/housing/item.cfm?type=2898 free free ringtones] [http://wc1.worldcrossing.com/WebX/.1de609ff free real ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30336 free qwest ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=343 cialis online] [http://students.hsc.unt.edu/housing/item.cfm?type=2924 ericsson ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=183 albuterol] [http://library.cshl.edu/wp/vb/member.php?u=1342 cheap phentermine] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=220 real ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2883 lipitor online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=203 funny ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=73 cheap ativan] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=218 free qwest ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=202 free tracfone ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=96 cheap levitra] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=105 mp3 ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1375 real ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30238 phentermine online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30355 free punk ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30349 free cingular ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=199 music ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2914 free sony ericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609e7 diazepam online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30315 buy lortab] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=143 free wwe ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2906 free samsung ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=174 cheap cyclobenzaprine] [http://wc1.worldcrossing.com/WebX/.1de60a03 sony ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2857 ativan online] [http://wc1.worldcrossing.com/WebX/.1de60a2d valium online] [http://students.hsc.unt.edu/housing/item.cfm?type=2856 cialis online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30242 fioricet online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=160 adipex online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=232 sony ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2900 free funny ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2870 cheap xenical] [http://news.engin.brown.edu/forums/thread-view.asp?tid=150 order tramadol] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30332 free tracfone ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30354 alltel ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=202 nokia ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=134 tramadol online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=167 carisoprodol online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30269 wellbutrin online] [http://students.hsc.unt.edu/housing/item.cfm?type=2893 cheap hgh] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=219 viagra online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30240 carisoprodol online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30316 cheap vigrx] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30351 sonyericsson ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30350 sagem ringtones] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=332 tramadol online] [http://students.hsc.unt.edu/housing/item.cfm?type=2925 free mtv ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2915 mono ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30359 free wwe ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2849 but valium] [http://students.hsc.unt.edu/housing/item.cfm?type=2867 cheap hydrocodone] [http://wc1.worldcrossing.com/WebX/.1de60a16 online levitra] [http://library.cshl.edu/wp/vb/member.php?u=1379 music ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2919 sharp ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30338 motorola ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=174 wellbutrin online] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=84 diethylpropion online] [http://students.hsc.unt.edu/housing/item.cfm?type=2882 zoloft online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=217 punk ringtones] [http://news.engin.brown.edu/forums/thread-view.asp?tid=220 punk ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=86 cheap fioricet] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=186 jazz ringtones] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30253 cheap norco] [http://students.hsc.unt.edu/housing/item.cfm?type=2920 midi ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=164 buy alprazolam] [http://students.hsc.unt.edu/housing/item.cfm?type=2884 cheap celexa] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=240 soma online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=347 adipex online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=180 buy prozac] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=353 online levitra] [http://wc1.worldcrossing.com/WebX/.1de60a33 cheap prozac] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=179 cheap fioricet] [http://students.hsc.unt.edu/housing/item.cfm?type=2926 free jazz ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1384 free sonyericsson ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=213 prozac online] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=233 sonyericsson ringtones] [http://wc1.worldcrossing.com/WebX/.1de609de alprazolam] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=183 cheap hgh] [http://news.engin.brown.edu/forums/thread-view.asp?tid=160 ativan online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=217 free mono ringtones] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=226 cheap tramadol] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=148 order zyban] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=225 free wwe ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1385 sony ericsson ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=108 nexium online] [http://wc1.worldcrossing.com/WebX/.1de60a32 zoloft] [http://students.hsc.unt.edu/housing/item.cfm?type=2854 cheap ultram] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=358 free mp3 ringtones] [http://library.cshl.edu/wp/vb/member.php?u=1359 ambien online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=334 order valium] [http://news.engin.brown.edu/forums/thread-view.asp?tid=173 xenical online] [http://library.cshl.edu/wp/vb/member.php?u=1371 funny ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2895 hoodia online] [http://news.engin.brown.edu/forums/thread-view.asp?tid=191 lortab online] [http://www.e.kth.se/cgi-bin/esekt/discussion?command=read&discussionid=4&id=30353 free mono ringtones] [http://www.ees.ufl.edu/alumni/forums.asp?ForumId=5&TopicId=68 buy adipex] [http://itcweb.ecsu.edu/portal/forums.asp?ForumId=13&TopicId=194 free midi ringtones] [http://wc1.worldcrossing.com/WebX/.1de60a34 sony ericsson ringtones] [http://students.hsc.unt.edu/housing/item.cfm?type=2847 tramadol online] [http://www.psfc.mit.edu/~jinseok/bbse/view.php?id=presentations&no=335 buy phentermine] {{Greasemonkey Manual TOC}}


= Why a Special Environment? =
= Why a Special Environment? =

Revision as of 09:06, 15 July 2007

verizon ringtones cheap adipex meridia online samsung ringtones free cingular ringtones clomid online cheap lisinopril cheap carisoprodol paxil online ericsson ringtones free mono ringtones albuterol online ericsson ringtones ambien online levitra online cheap didrex free midi ringtones clomid online cheap lipitor sagem ringtones cheap meridia free sony ringtones valium online clomid online hoodia online music ringtones hydrocodone but adipex cheap hgh cheap hgh order levitra tracfone ringtones free sony ringtones propecia online cheap vicodin soma online free verizon ringtones meridia online order vicodin verizon ringtones cheap alprazolam nokia ringtones qwest ringtones free sharp ringtones polyphonic ringtones cheap viagra sildenafil online didrex online wellbutrin cyclobenzaprine online funny ringtones rivotril online paxil online free sharp ringtones free sagem ringtones xenical online cheap hydrocodone cheap lortab phentermine online cheap lorazepam free polyphonic ringtones order xenical buy wellbutrin cheap ultracet paxil online ultracet online jazz ringtones alprazolam online free mono ringtones vicodin cheap albuterol free funny ringtones free free ringtones pharmacy online online cheap nexium vigrx online buy ativan free polyphonic ringtones flexeril online free punk ringtones free midi ringtones but ultram fioricet online tracfone ringtones hydrocodone online free sprint ringtones order meridia cheap valium cheap phentermine cheap vicodin free cingular ringtones buy wellbutrin adipex online midi ringtones cheap sildenafil free sagem ringtones flexeril online free free ringtones free real ringtones free qwest ringtones cialis online ericsson ringtones albuterol cheap phentermine real ringtones lipitor online funny ringtones cheap ativan free qwest ringtones free tracfone ringtones cheap levitra mp3 ringtones real ringtones phentermine online free punk ringtones free cingular ringtones music ringtones free sony ericsson ringtones diazepam online buy lortab free wwe ringtones free samsung ringtones cheap cyclobenzaprine sony ringtones ativan online valium online cialis online fioricet online adipex online sony ringtones free funny ringtones cheap xenical order tramadol free tracfone ringtones alltel ringtones nokia ringtones tramadol online carisoprodol online wellbutrin online cheap hgh viagra online carisoprodol online cheap vigrx sonyericsson ringtones sagem ringtones tramadol online free mtv ringtones mono ringtones free wwe ringtones but valium cheap hydrocodone online levitra music ringtones sharp ringtones motorola ringtones wellbutrin online diethylpropion online zoloft online punk ringtones punk ringtones cheap fioricet jazz ringtones cheap norco midi ringtones buy alprazolam cheap celexa soma online adipex online buy prozac online levitra cheap prozac cheap fioricet free jazz ringtones free sonyericsson ringtones prozac online sonyericsson ringtones alprazolam cheap hgh ativan online free mono ringtones cheap tramadol order zyban free wwe ringtones sony ericsson ringtones nexium online zoloft cheap ultram free mp3 ringtones ambien online order valium xenical online funny ringtones hoodia online lortab online free mono ringtones buy adipex free midi ringtones sony ericsson ringtones tramadol online buy phentermine


Greasemonkey Manual
Using Greasemonkey
Installing Scripts
Monkey Menu
Getting Help
User Script Authoring
Editing
Environment
API

Why a Special Environment?

When Greasemonkey executes a user script it does so in a special sandbox environment. Greasemonkey takes advantage of a Firefox feature called XPCNativeWrappers to insulate the user script from the content web page, which it references.

Although this makes it more difficult, or impossible, to do certain things in your script, it is a necessary evil. Earlier versions of Greasemonkey had no such sandbox, and as a result, security holes were uncovered.

Greasemonkey provides certain enhanced APIs to the user script, so that it may accomplish things that a regular web page's javascript cannot. This useful feature has enabled some of the most popular scripts. Unfortunately, when abused, these powerful features can create serious problems. No exploits were ever uncovered in the wild, but the potential was too great, so the sandbox environment was created.

Luckily, for almost all the difficulties that the sandbox environment provides, there are ways to still accomplish the desired goal. The article Avoid Common Pitfalls in Greasemonkey does a wonderful job explaining what the most common snags are, and for each one explains the way to work around the problem. It is essential reading for any script author.

Finally, of note is the unsafeWindow object present in the sandbox. As the name implies, use of this object is unsafe! This is the raw, un-sandboxed "window" of the content page. Certain limited tasks can only be accomplished by referencing this raw window directly, but be warned! Javascript is a complicated and intricate language, even the most basic operations can be redefined by the content page to perform other actions. The sandbox environment is provided for your safety, and the safety of any user of your script. If at all possible, use of unsafeWindow should be avoided.

What's Missing?

Depending on your usage, the special Greasemonkey environment may seem perfectly normal, or excessively limiting. The Greasemonkey environment is a vanilla XPCNativeWrapper of the content window, with only certain extra bits added in to emulate a normal environment, or changed. Specifically:

  • window is an XPCNW of the content window.
    • document is the document object of that (XPCNW) window object.
  • XPathResult is added, so that document.evaluate() works.
  • The entire script is contained inside an anonymous function, to guarantee each script is isolated from any other.
    • This means window is not the normal "global" scope. After var i=5;, window['i'] is not 5, it is not even set!

Since Mozilla provides a rich environment, there are a wide variety of things that have not been imported from the general content scope into the Greasemonkey sandbox. Including, but not limited to:

And so on. The more esoteric the method, the less likely that it has been included in the Greasemonkey sandbox.

See also