Skip to main content
100%

Gist 164985

✓ Published0🌍 Public
XXXX
Last edited Aug 10, 2009
Created on Aug 10, 2009

This example demonstrates a failed attempt to use an XMLHttpRequest inside a Web Worker, triggered by a postMessage from the main page. The main script creates a Worker from `my_worker.js`, which defines a `makeRequest` function that tries to open a GET request to `http://www.google.com/`. The worker’s `onmessage` handler calls this function, but the request fails with an exception (`0x805e000a`), revealing that cross-origin or file-protocol requests are blocked in this context. The code uses the Web Worker API and the native `XMLHttpRequest` object, but does not show any data visualization or rendering.

AI-generated description

Similar vizzes