2015-11-04 60 views

回答

1
(function (global, factory) { 
    if (typeof define === "function" && define.amd) define(factory); //AMD 
    else if (typeof module === "object") module.exports = factory(); //CommonJS 
    else global.Geolocation = factory(); // for example browser (global will be window object) 
}(this, function() { 

var Geolocation = function(callback){ 
    this._latitude   = null; 
    this._longitude   = null; 
    this._accuracy   = null; 
} 

Geolocation.prototype = { 
    //prototype definitions in here 
} 

return Geolocation; 

})); 
相关问题