From the Chrome Extension Docs...
Content scripts are JavaScript files that run in the context of web pages. By using the standard DOM, they can read details of the web pages the browser visits, or make changes to them.JS is running in your app that you didn't put there.
window.onerror = function( message, file, line ) { var formattedMessage = '[' + file + ':' + line + '] ' + message; _gaq.push( [ '_trackEvent', 'Exceptions', 'Application', formattedMessage, null, true ] ); }
Mostly harmless, except when they...
AdBlock blocks ads (...duh)
yepnope({ load: [ 'vendor.js', 'lib.js', 'app.js', 'googleadservices.com/conversion.js' ], complete: function () { app.init(); } });
<body screen_capture_injected="true">
Lets users write & run any arbitrary JS
var clippy = document.getElementById('clippy'); clippy.classList.add('being-helpful');
Run
var wtfIHateClippySoMuch = document.getElementById('clippy'); wtfIHateClippySoMuch.parentNode.removeChild( wtfIHateClippySoMuch );
Run
Our app:var clippy = document.getElementById('clippy'); clippy.classList.add('being-helpful');
Run
You will never test your JS in every context in which it will run.
Don't care about <noscript> users? Do it for <brokenscript> users!
It's nice to know.
Unreproducible bugs === some browser extension (probably)
Slides: github.com/bensmithett
Twitter: @bensmithett