Skip to content

Commit 6e0d7e3

Browse files
committed
add flags instructions
1 parent 94ead0c commit 6e0d7e3

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

explainers/permissions-policy-deprecate-unload.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,30 @@ The currernt proposal makes this a tempoarary state.
313313

314314
No other concerns are known.
315315

316+
# Testing with Chrome
317+
318+
As of [117.0.5924.2](https://chromiumdash.appspot.com/commit/2cf526285beacdfebe2251a20ad5550b3487a277),
319+
flags are available to control this deprecation.
320+
To force the depraction,
321+
you can start Chrome with
322+
323+
```
324+
--enable-features=PermissionsPolicyUnload --disable-features=DeprecateUnloadByUserAndOrigin
325+
```
326+
327+
After that you can open a devtools window
328+
and try
329+
330+
```
331+
addEventListener("unload", () => {})
332+
```
333+
334+
You should see
335+
336+
```
337+
[Violation] Permissions policy violation: unload is not allowed in this document.
338+
```
339+
316340
# [Self-Review Questionnaire: Security and Privacy](https://w3ctag.github.io/security-questionnaire/)
317341

318342
01. What information might this feature expose to Web sites or other parties,

0 commit comments

Comments
 (0)