Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit e6d588a

Browse files
committed
Fix some typos
1 parent 6e6eb0a commit e6d588a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/006-local-js-dependencies.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on local JS files.
1111
* The `module` attribute can now be used to import files explicitly:
1212

1313
```rust
14-
#[wasm_bindgen(file = "/js/foo.js")]
14+
#[wasm_bindgen(module = "/js/foo.js")]
1515
extern "C" {
1616
// ...
1717
}
@@ -108,7 +108,7 @@ As an example, a library may contain:
108108

109109
```rust
110110
// src/lib.rs
111-
#[wasm_bindgen(file = "js/foo.js")]
111+
#[wasm_bindgen(module = "/js/foo.js")]
112112
extern "C" {
113113
fn call_js();
114114
}
@@ -251,7 +251,7 @@ like so:
251251
```rust
252252
// lib.rs
253253

254-
#[wasm_bindgen(file = "local-snippet.js")]
254+
#[wasm_bindgen(module = "/js/local-snippet.js")]
255255
extern {
256256
fn take_u8_slice(memory: &JsValue, ptr: u32, len: u32);
257257
}
@@ -265,7 +265,7 @@ pub fn call_local_snippet() {
265265
```
266266

267267
```js
268-
// local-snippet.js
268+
// js/local-snippet.js
269269

270270
export function take_u8_slice(memory, ptr, len) {
271271
let slice = new UInt8Array(memory.arrayBuffer, ptr, len);

0 commit comments

Comments
 (0)