Replies: 2 comments 4 replies
-
I didn't look into this, but I'm going to assume this is not an issue with I'm happy to look into it further if a minimal example is provided. With minimal I mean without any further dependencies, e.g. Yew. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for your answer. Here is a small example without YEW. The left IFRAME is accessed through RUST/WEBASM. The right IFRAME is accessed in JS (showing that it works). |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug
Conversion of Document into HTMLDocument wit dyn_into always fails for a IFRAME content document.
(works correctly on the main document)
Steps to Reproduce
let window = window().unwrap();
let document = window.document().unwrap();
let elem = document.get_element_by_id("edit").unwrap();
let texteditor = elem.dyn_into::().unwrap();
let win2 = texteditor.content_window().unwrap();
let doc2 = win2.document();
let res_doc2_as_html = doc2.dyn_into::();
match res_doc2_as_html {
Ok (doc2_as_html) => {
doc2_as_html.exec_command(pressed_id.as_str()).unwrap();
},
Err(_) => {
log!("Could not convert document into HTMLDocument");
}
}
Always returns the error (could not convert).
Expected Behavior
The document should be converted into HtmlDocument so that command_exec can be called on the content.
Actual Behavior
The dyn_into conversion fails.
If applicable, add screenshots to help explain your problem.
Additional Context
See demo Yew app attached.
demo_err.zip
Beta Was this translation helpful? Give feedback.
All reactions