Does Greasemonkey insert the wrapper into the source JavaScript code or add it as any event handler such as window.onload?
GM侦听DOMContentLoaded事件(基本上是DOM Ready)here.然后包装用户脚本代码并将其插入沙箱here.