Skip to content

Commit

Permalink
Fix issue 26048: document security requirements for opening and focus… (
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg authored May 19, 2023
1 parent c9cc38c commit 1200b31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions files/en-us/web/api/clients/openwindow/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ A {{jsxref("Promise")}} that resolves to a {{domxref("WindowClient")}} object if
URL is from the same origin as the service worker or a {{Glossary("null", "null
value")}} otherwise.

### Exceptions

- `InvalidAccessError` {{domxref("DOMException")}}
- : The promise is rejected with this exception if none of the windows in the app's origin have [transient activation](/en-US/docs/Web/Security/User_activation).

## Security requirements

- At least one window in the app's origin must have [transient activation](/en-US/docs/Web/Security/User_activation).

## Examples

```js
Expand Down
9 changes: 9 additions & 0 deletions files/en-us/web/api/windowclient/focus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ None.

A {{jsxref("Promise")}} that resolves to the existing {{domxref("WindowClient")}}.

### Exceptions

- `InvalidAccessError` {{domxref("DOMException")}}
- : The promise is rejected with this exception if none of the windows in the app's origin have [transient activation](/en-US/docs/Web/Security/User_activation).

## Security requirements

- At least one window in the app's origin must have [transient activation](/en-US/docs/Web/Security/User_activation).

## Examples

```js
Expand Down

0 comments on commit 1200b31

Please sign in to comment.