mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-26 06:22:14 +00:00
Fix the no_modules
example by fixing --browser
Recent refactorings forgot a case of emitting code for `cachedTextDecoder`!
This commit is contained in:
parent
84bda02bbf
commit
3f357f46eb
@ -1088,6 +1088,8 @@ impl<'a> Context<'a> {
|
|||||||
", s)
|
", s)
|
||||||
);
|
);
|
||||||
self.global(&format!("let cached{0} = new l{0}('utf-8');", s));
|
self.global(&format!("let cached{0} = new l{0}('utf-8');", s));
|
||||||
|
} else {
|
||||||
|
self.global(&format!("let cached{0} = new {0}('utf-8');", s));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
|
|
||||||
// here we tell bindgen the path to the wasm file so it can run
|
// here we tell bindgen the path to the wasm file so it can run
|
||||||
// initialization and return to us a promise when it's done
|
// initialization and return to us a promise when it's done
|
||||||
wasm_bindgen('./no_modules_bg.wasm').then(run);
|
wasm_bindgen('./no_modules_bg.wasm')
|
||||||
|
.then(run)
|
||||||
|
.catch(console.error);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user