Updated for window events

master
DavidOConnor 6 years ago
parent 033b35ce5a
commit 2a1f4d59b2

@ -10,7 +10,7 @@ crate-type = ["cdylib"]
[dependencies] [dependencies]
seed = "^0.2.0" seed = "^0.2.1"
wasm-bindgen = "^0.2.29" wasm-bindgen = "^0.2.29"
web-sys = "^0.3.6" web-sys = "^0.3.6"

@ -21,7 +21,7 @@ For example, with [Python](https://www.python.org/downloads/) installed, run `py
(Linux users may need to run `python3 serve.py`.) (Linux users may need to run `python3 serve.py`.)
If you run into permission errors on `build.sh`, try this command If you run into permission errors on `build.sh`, try this command
to allow executing the file:`chmod +x build.sh`. If you run into persmission errors on `build.ps`, open Powershell as an administrator, and enter this command: `Set-ExecutionPolicy RemoteSigned`. to allow executing the file:`chmod +x build.sh`. If you run into persmission errors on `build.ps1`, open Powershell as an administrator, and enter this command: `Set-ExecutionPolicy RemoteSigned`.
Once you rename the crate in `Cargo.toml` (The `name` field under `[Package]`), make the Once you rename the crate in `Cargo.toml` (The `name` field under `[Package]`), make the
following changes: following changes:

@ -1,7 +1,6 @@
#[macro_use] #[macro_use]
extern crate seed; extern crate seed;
use seed::prelude::*; use seed::prelude::*;
use wasm_bindgen::prelude::*;
// Model // Model
@ -45,5 +44,5 @@ fn view(state: seed::App<Msg, Model>, model: Model) -> El<Msg> {
#[wasm_bindgen] #[wasm_bindgen]
pub fn render() { pub fn render() {
seed::run(Model::default(), update, view, "main", None); seed::run(Model::default(), update, view, "main", None, None);
} }
Loading…
Cancel
Save