content icon indicating copy to clipboard operation
content copied to clipboard

Refactor Web Extensions Permissions API examples to async/await

Open Hamatti opened this issue 3 years ago • 1 comments

Description

Refactoring the examples in Web Extensions Permissions API from .then() syntax to async/await syntax.

Motivation

We are moving towards having the Web Extensions examples using that syntax and as I'm writing a blog post for the add-ons community blog where I use these examples, it came up that this would be a good moment to refactor them in MDN and then use the same format in the blog post.

For example, tabs API and background_scripts are already refactored.

Additional details

Related issues and pull requests

Hamatti avatar Nov 04 '22 16:11 Hamatti

Thanks @Hamatti and @rebloor, merging 🙌🏻

bsmth avatar Nov 07 '22 13:11 bsmth