summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/tour/index.html4
-rw-r--r--winit/src/application.rs4
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/tour/index.html b/examples/tour/index.html
index c64af912..09d03367 100644
--- a/examples/tour/index.html
+++ b/examples/tour/index.html
@@ -1,12 +1,12 @@
<!DOCTYPE html>
-<html lang="en">
+<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tour - Iced</title>
<base data-trunk-public-url />
</head>
-<body>
+<body style="height: 100%; margin: 0">
<link data-trunk rel="rust" href="Cargo.toml" data-wasm-opt="z" data-bin="tour" />
</body>
</html>
diff --git a/winit/src/application.rs b/winit/src/application.rs
index 0c596b3f..1fd51d82 100644
--- a/winit/src/application.rs
+++ b/winit/src/application.rs
@@ -159,6 +159,10 @@ where
use winit::platform::web::WindowExtWebSys;
let canvas = window.canvas().expect("Get window canvas");
+ let _ = canvas.set_attribute(
+ "style",
+ "display: block; width: 100%; height: 100%",
+ );
let window = web_sys::window().unwrap();
let document = window.document().unwrap();