Does Greasemonkey include a wrapper in the JavaScript source code, or add it like any event handler like window.onload?
GM listens for the DOMContentLoaded event (mostly DOM Ready) here . Then it completes the usercript code and inserts it into the sandbox here .
erikvold
source share