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

> +    devices => devices.filter(({ kind }) => kind === "videoinput")
> +  )
> +  // get the deviceId of first camera, create query object
> +  .then(
> +    ([{ deviceId }]) => ({ name: "camera", deviceId })
> +  )
> +  // perform query
> +  .then(
> +    queryObj => navigator.permissions.query(queryObj)
> +  )
> +  // log the state
> +  .then(
> +    ({ state }) => console.log("Permission state of first camera is", state)
> +  )
> +  .catch(
> +    (err) => console.error(err.stack)

You don't need the ()s around `err` here. Do we want to be consistent about being completely minimal, or do we not care?

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

Received on Monday, 11 July 2016 16:22:05 UTC