Are Chrome user-scripts separated from the global namespace like Greasemonkey scripts?
I know Greasemonkey scripts are automatically wrapped in anonymous functions isolated in some way in order to prevent them conflicting with scripts in the page. Does the same happen with Chrome user-scripts? Yes, Greasemonkey scripts are normally wrapped in an anonymous function . And, Chrome userscripts apparently are too . But, more importantly, Greasemonkey scripts are usually 1 wrapped in an XPCNativeWrapper sandbox, while Google Chrome converts userscripts into extensions, and they operate in an arena that Google calls an "isolated world" 2 . So, you don't need to wrap your script code in