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 }) => {

With bikeshed, you can leave things inside `<pre>` indented, and it'll figure out the indentation level.

---
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#r70288414

Received on Monday, 11 July 2016 16:15:32 UTC