From 5dcde83b4ced6b855a6d848205fa41f9d00dd53d Mon Sep 17 00:00:00 2001 From: icefoxen Date: Thu, 22 Mar 2018 12:56:21 -0400 Subject: [PATCH] Fix readme for webassembly usage. (#425) Needs to do `getElementById()`, not just have the ID name. Not sure if this is a winit change or what. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b632a57f..d67cc20c 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,6 @@ Building a binary will yield a `.js` file. In order to use it in an HTML file, y - Put a `` element somewhere. A canvas corresponds to a winit "window". - Write a Javascript code that creates a global variable named `Module`. Set `Module.canvas` to - the ID of the `` element (in the example this would be `"my_id"`). More information - [here](https://kripken.github.io/emscripten-site/docs/api_reference/module.html). + the element of the `` element (in the example you would retrieve it via `document.getElementById("my_id")`). + More information [here](https://kripken.github.io/emscripten-site/docs/api_reference/module.html). - Make sure that you insert the `.js` file generated by Rust after the `Module` variable is created.