The Chromium Projects

Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution 2.5 license, and examples are licensed under the BSD License.

The Chromium OS designs and code are preliminary. Expect them to evolve.
For Developers‎ > ‎Design Documents‎ > ‎Extensions‎ > ‎

Cross-Origin XHR


This page is obsolete. Please see the new version at:

http://code.google.com/chrome/extensions/xhr.html

Overview

The standard XMLHttpRequest object can be used to communicate with multiple origins (ie domains) from an extension. You must pre-register the domains you want to talk to in the manifest, like so:

{
  "name": "My First Extension",
  "version": "1.0",
  "description": "The first extension that I made.",
  "permissions": [
    "http://www.blogger.com/",
    "http://*.google.com/"
  ]
}

Status
Implemented, but we don't yet enforce the permissions; all origins are allowed for now.

Details