Geolocation - Webshim

by gavinfoley

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/webshim/1.9.1/polyfiller.js"></script>

JavaScript

$.webshims.setOptions({
			//we do not use any DOM-/JS-APIs on DOM-ready, so we do not need to delay the ready event <- good against fouc
			waitReady: false,
			geolocation: {
				confirmText: '{location} wants to know your position. It is Ok to press Ok.'
			}
});


//load all polyfill features
//or load only a specific feature with $.webshims.polyfill('feature-name');
$.webshims.polyfill('geolocation');