Skip to content

Commit

Permalink
Merge pull request #16 from WICG/marcoscaceres-patch-1
Browse files Browse the repository at this point in the history
Update HOWTO.md - syntax highlight examples
  • Loading branch information
andypaicu authored Apr 30, 2024
2 parents 1ba2466 + ab39d42 commit 8b208d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ You can visit https://permission.site/pepc for a quick example and test.

To add the PEPC element to your page simply include it as you would any other HTML element. It does not have an end tag or contents.

```
```HTML
<permission type="camera microphone" ondismiss="promptDismiss()" onresolve="promptResolve()">
```

Current supported `type` attribute values (on Chrome) are: `"camera"`, `"microphone"` or both together `"camera microphone"`.

In order to make use of the permission you can use the permissions API to listen to permission status changes. This has the advantage that you will catch all permission status changes.

```
```JS
navigator.permissions.query({name: "camera"})
.then((permissionStatus) => {
permissionStatus.onchange = () => {
Expand Down

0 comments on commit 8b208d2

Please sign in to comment.