bcoe/DoloresLabsTechTalk — Issue #1: Content scripts can make cross-site requests
Author: nigma
Created: 2012-01-21 00:51:50+00:00
State: open

This feature was added in Chrome 13.

Content scripts can make XHR requests to the same servers as the rest of the extension (as defined in manifest.js). In many cases this dramatically simplifies creating extensions because it eliminates the need of exchanging messages with the background page.

This is how my extension for AI Class works - https://github.com/nigma/ai-class-chrome-extension. For more information take a look http://code.google.com/chrome/extensions/xhr.html.

It also may be worth noting that content scripts run in isolated environment. This means that you can access DOM but you can't call JS libraries originally included in the webpage. This is also why it is safe to bundle a custom version of i.e. jQuery as a content script.

Nice write-up btw.