On Mar 9, 2010, at 9:48 PM, Ruben Rodriguez wrote:
On 03/09/2010 11:44 PM, Dave Land wrote:
On Mar 9, 2010, at 9:18 PM, Aleksandr Rainchik wrote:
Why would someone want to enclose the code with this (function()
{...}) (); ?
What does it actually do?
If I'm mistaken in how I've explained this, the bright people on
this list will no doubt jump in to correct me.
If that's the case, then GM should wrap the script automatically and
not leave it to the script writer, IMO.
I believe that it does now. In fact, it wraps it twice: once in an
anonymous function, and again using sandbox facilities built into
Firefox.
The practice of wrapping code in an anonymous function is an artifact
of the earliest days of GM.
Dave
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.