dojo.gears

A small adapter testing the presence of and providing an instance of a Google Gears factory. Exports a global google.gears object if present.

Example

Dojo 1.7 (AMD)

require(["dojo/gears", "dojo/ready"], function(gears, ready){
    ready(function(){
        if(gears.available){
            // safe to assume google.gears.factory is a gears factory
        }
    });
});

Dojo < 1.7

dojo.require("dojo.gears");
dojo.ready(function(){
    if(dojo.gears.available){
        // safe to assume google.gears.factory is a gears factory
    }
});
Error in the documentation? Can’t find what you are looking for? Let us know!