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
Firstly thanks for building such a wonderful library!
I'm hoping to include a small wasm app in an mdbook. I have some rust experience but very little web experience.
I'm including this snippet in an md page, which was build by trunk:
<script type="module">import init from './dist/index-aa17a837077bf43a.js';init('./dist/index-aa17a837077bf43a_bg.wasm');</script></body></html>
This almost works — initially the normal md page appears, and then a moment later the wasm app appears. But the wasm app fills the whole screen — there's no sidebar remaining.
Possibly this question could be reduced to "embed an HTML page within an mdbook", and the wasm aspect is tangential? If so, has anyone succeeded at this? It seems related to #773.
Thank you
The text was updated successfully, but these errors were encountered:
This sounds like more of a web-development question. My understanding is that WASM just provides a means to call functions, not unlike javascript, there's nothing fundamental about it taking control of the page. Your WASM app would need to know where and how to manipulate the existing DOM. You could also investigate something like iframe, but that can have its own issues.
I also notice you have </body></html> which seems a bit unusual.
I doubt you'll be able to find much help for general web development here. I might suggest trying to find some forum or site where you can ask questions of that nature.
Possibly this question could be reduced to "embed an HTML page within an mdbook", and the wasm aspect is tangential? If so, has anyone succeeded at this?
...and possible even more reduced to "embed an HTML page within another". Though if anyone has done this successfully in an mdbook, I'd be grateful to learn how.
Firstly thanks for building such a wonderful library!
I'm hoping to include a small wasm app in an mdbook. I have some rust experience but very little web experience.
I'm including this snippet in an md page, which was build by
trunk
:This almost works — initially the normal
md
page appears, and then a moment later the wasm app appears. But the wasm app fills the whole screen — there's no sidebar remaining.Possibly this question could be reduced to "embed an HTML page within an mdbook", and the wasm aspect is tangential? If so, has anyone succeeded at this? It seems related to #773.
Thank you
The text was updated successfully, but these errors were encountered: