webview_deno
webview_deno copied to clipboard
Fullscreen API
Full-screen API would be extremely useful.
The following is my test code:
import { Webview } from "https://deno.land/x/[email protected]/mod.ts";
const html = `
<html>
<body>
<script>
function testA() {
document.getElementById("test").innerHTML = "Script";
document.body.requestFullscreen();
}
function testB() {
document.body.requestFullscreen();
document.getElementById("test").innerHTML = "Fullscreen";
}
</script>
<h1>Hello from deno v${Deno.version.deno}</h1>
<h2 id="test">No Script</h2>
<button onclick="testB()">Fullscreen</button>
<script>testA();</script>
</body>
</html>
`;
const webview = new Webview();
webview.navigate(`data:text/html,${encodeURIComponent(html)}`);
webview.run();
Web API requires that the script has user input before allowing full-screen, however it would be more useful to not require it.
Alternatively it would be useful to trigger full-screen mode from the Deno process instead of from within the window.
https://github.com/webview/webview/issues/458
Also minimize / maximize