In chrome permissions for geolocation doesn't work

When I add a simple code which would ask for geolocation permissions is getting failed and doesn’t ask for allowance while everything works fine on safari and on firefox! This is the code I used: W3Schools Tryit Editor
And You can check it out with this link https://hayk120.wixsite.com/mysite
Thanks.