Background
There are some Web APIs that are "gated by user activation". An example of such an API is the Fullscreen API.
Question
Default popup page window is not treated as being user activated. Why is that? I would expect that if a user clicked the toolbar icon to open the popup the code will be treated as user activated.
Example
manifest.json
{
"name": "Test",
"description": "Test"
"version": "1.0.0",
"manifest_version": 3,
"action": {
"default_popup": "popup.html",
}
}
popup.html
<html>
<body>
<script src="popup.js"></script>
</body>
</html>
popup.js
document.body.requestFullscreen();
The above code won't work. In Chrome I will get following warning: Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.