Re: [w3c/permissions] chore(examples): Modernize JS examples (#101)

> @@ -912,16 +912,19 @@ spec: webidl
>      add the feature.
>    </p>
>    <pre class='highlight'>
> -    &lt;script&gt;
> -      navigator.permissions.query({name:'geolocation'}).then(function(result) {
> -        if (result.state == 'granted') {
> -          showLocalNewsWithGeolocation();
> -        } else if (result.state == 'prompt') {
> -          showButtonToEnableLocalNews();
> -        }
> -        // Don't do anything if the permission was denied.
> -      });
> -    &lt;/script&gt;
> +navigator.permissions.query({ name: "geolocation" }).then(({ state }) => {

Will re-indent.  

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/101/files/470ed130ca7c83f19116181ac87726635a43802b#r70370926

Received on Tuesday, 12 July 2016 03:01:40 UTC