You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/community/awesome.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ description: 'Community projects built using yew'
127
127
128
128
-[The WebAssembly Book](https://rustwasm.github.io/docs/book/) - Working with the web and producing .wasm files.
129
129
-[The wasm-bindgen Guide](https://wasm-bindgen.github.io/wasm-bindgen/) - How to bind Rust and JavaScript APIs.
130
-
-[The wasm-pack Guide](https://rustwasm.github.io/docs/wasm-pack/) - How to build and work with rust-generated WebAssembly.
130
+
-[The wasm-pack Guide](https://drager.github.io/wasm-pack/book/) - How to build and work with rust-generated WebAssembly.
131
131
-[Programming WebAssembly with Rust](https://pragprog.com/book/khrust/programming-webassembly-with-rust) - Includes a chapter `Advanced JavaScript Integration with Yew` on creating an app with Yew.
132
132
-[Creative Projects for Rust Programmers](https://www.oreilly.com/library/view/creative-projects-for/9781789346220/) - Chapter 5, `Creating a Client-Side WebAssembly App Using Yew`.
Copy file name to clipboardExpand all lines: website/docs/concepts/basic-web-technologies/wasm-bindgen.mdx
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ This section will explore some of these crates at a high level, to make it easie
18
18
and use `wasm-bindgen` APIs with Yew. For a more in-depth guide to `wasm-bindgen` and its associated
19
19
crates then check out [The `wasm-bindgen` Guide](https://wasm-bindgen.github.io/wasm-bindgen/).
20
20
21
-
For documentation on the above crates check out [`wasm-bindgen docs.rs`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/index.html).
21
+
For documentation on the above crates check out [`wasm-bindgen docs.rs`](https://wasm-bindgen.github.io/wasm-bindgen/api/wasm_bindgen/index.html).
22
22
23
23
:::tip
24
24
Use the `wasm-bindgen` doc.rs search to find browser APIs and JavaScript types that have been imported
@@ -97,12 +97,12 @@ These implementations allow you to call a method from `A` on an instance of `C`
97
97
it was `&B` or `&A`.
98
98
99
99
It is important to note that every single type imported using `#[wasm-bindgen]` has the same root type,
100
-
you can think of it as the `A` in the example above, this type is [`JsValue`](https://rustwasm.github.io/wasm-bindgen/api/wasm_bindgen/struct.JsValue.html) which has
100
+
you can think of it as the `A` in the example above, this type is [`JsValue`](https://wasm-bindgen.github.io/wasm-bindgen/api/wasm_bindgen/struct.JsValue.html) which has
101
101
its section below.
102
102
103
103
_[extends section in The `wasm-bindgen` Guide](https://wasm-bindgen.github.io/wasm-bindgen/reference/attributes/on-js-imports/extends.html)_
Rust has a strong type system and JavaScript...doesn't 😞. For Rust to maintain these
122
122
strong types but still be convenient, the WebAssembly group came up with a pretty neat trait `JsCast`.
@@ -132,7 +132,7 @@ unsure what type a certain object is, you can try to cast it, which returns poss
132
132
133
133
A common example of this in [`web-sys`](./web-sys.mdx) is when you are trying to get the
134
134
target of an event. You might know what the target element is, but the
135
-
[`web_sys::Event`](https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Event.html) API will always return an [`Option<web_sys::EventTarget>`](https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Event.html#method.target).
135
+
[`web_sys::Event`](https://wasm-bindgen.github.io/wasm-bindgen/api/web_sys/struct.Event.html) API will always return an [`Option<web_sys::EventTarget>`](https://wasm-bindgen.github.io/wasm-bindgen/api/web_sys/struct.Event.html#method.target).
136
136
You will need to cast it to the element type so you can call its methods.
0 commit comments