require(["Geo", "MessageElement"], function () { "use strict"; var geo = new Geo(); var area = new MessageElement("geo"); if (geo.getGeo()) { geo.showLocation(area); } else { area.set("Geolocation API is not available."); } });