
// ask customer for permission request
document.addEventListener("DOMContentLoaded", function() {
    if ('geolocation' in navigator) {
        navigator.permissions.query({ name: 'geolocation' })
            .then(permissionStatus => {
                if (permissionStatus.state === 'granted') {
                    console.log(true); // Permission granted
                } else {
                    console.log('Permission denied'); // Permission denied
                }
            })
            .catch(error => {
                console.error('Error occurred:', error); // Log any errors
                console.log('Permission not granted (possibly due to an error)');
            });
    } else {
        console.log('Geolocation not supported');
    }
});