[Greasemonkey] What is GM_executeContentScript?

Mark Pilgrim pilgrim at gmail.com
Sun Mar 12 14:13:48 EST 2006


I'm finally working on updating "Dive Into Greasemonkey" (like really
working on it, like I've spent 12 of the past 72 hours working on it).
 Public drafts will be announced on this list shortly.

At the moment, I'm trying to update the API section, and I came across
an API function called GM_executeContentScript.  I can find no
reference to this function in the mailing list archives.  It is not
documented on <http://greasemonkey.mozdev.org/authoring.html>.  I can
not find any scripts on <http://userscripts.org/> that use it.  In
fact, I can not find a single reference to it anywhere on the web.

>From my limited understanding of the source code, it appears to
execute a script (string or function object) in the context of the
page (and not the Greasemonkey sandbox).  Is this an accurate
description?  If so, what was the intended use case?  Are there any
working examples of scripts that use this API that could not achieve
the same goal by other means?

--
Cheers,
-Mark


More information about the Greasemonkey mailing list