Thursday, July 12th, 2007
Google Gears Roadmap and Features
Othman Laraki of the Google Gears team has published news on the Gears Roadmap and Development Process in which he discusses new features and details on the open process that the Gears team is going to follow.
Two concrete features that are forthcoming are:
Google Gears has a strict same-origin security model. However, some web applications need to affect Gears resources in other origins. We can solve the problem by making a few incremental additions to the WorkerPool class. Those additions are noted below.
-
-
int createWorker(fullScript)
-
int createWorkerFromUrl(scriptUrl) // NEW METHOD
-
void allowCrossOrigin() // NEW METHOD
-
void sendMessage(messageString, destWorkerId)
-
callback onmessage(messageString, srcWorkerId, [srcOrigin]) // NEW 3RD PARAM
-
WorkerPool has several issues today that make it harder to get started with compared to the other Gears APIs and this proposal addresses these issues by recommending the following changes:
- Add WorkerPool.load();
- Add WorkerPool.onerror;
- Support for the defacto standard Console object
- Remove the requirement to set google.gears.workerPool.onmessage inside workers
An example with console.log
-
-
// parent code
-
var wp = google.gears.factory.create("beta.workerpool", "1.1");
-
wp.load(["test.js"]);
-
wp.sendMessage("hello!");
-
-
// test.js
-
google.gears.workerPool.onmessage = function(message, senderId) {
-
console.log("worker got message %s from sender %s", message, sender);
-
If you have ideas, join in and be part of the process for a better web.












Leave a comment