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
Question - Where to put for example a getElmentbyId()? (via stdweb)
Description: I'm currently using yew master with proc macro enabled.
I added a canvas element.
If I get the canvas via un query selector of canvas ID, at the end of the main so after the yew application, it works well, but it's not integrated in the yew app.
if I put the stdweb canvas code in update() of the model the first rendering do not show the canvas square but still show the app, then the square appear after an update (onclick) which is logic.
But I would like to have my canvas rendered without any update too, so I remove it from update and put it at the end of create, but then when i load the app, nothing show not the canvas nor the "app" and the devtools console panic.
Why doesn't this work ? and what can I do to integrate canvas in yew ?
Actual Results
not working
Context (Environment)
Rust: v1.36 nightly
yew master (out of date from 2 days ~) with proc_macro
target: cargo web start with no additional flag
cargo-web 0.6.25
chrome 75 stable
here's a reduced test case:
where to put the canvas code ?
I think this can be closed now that mount has been added to the 0.9 release. We will also be implementing something like #616 or #665 for better element querying
Description
**I'm submitting a question
Question - Where to put for example a getElmentbyId()? (via stdweb)
Description: I'm currently using yew master with proc macro enabled.
I added a canvas element.
If I get the canvas via un query selector of canvas ID, at the end of the main so after the yew application, it works well, but it's not integrated in the yew app.
if I put the stdweb canvas code in update() of the model the first rendering do not show the canvas square but still show the app, then the square appear after an update (onclick) which is logic.
But I would like to have my canvas rendered without any update too, so I remove it from update and put it at the end of create, but then when i load the app, nothing show not the canvas nor the "app" and the devtools console panic.
Why doesn't this work ? and what can I do to integrate canvas in yew ?
Actual Results
not working
Context (Environment)
cargo-web 0.6.25
chrome 75 stable
here's a reduced test case:
where to put the canvas code ?
note: i had the same issue on the todomvc example
The text was updated successfully, but these errors were encountered: