mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 04:33:06 +00:00
fix headless tests on desktop
This commit is contained in:
parent
271b53e866
commit
acbc1f6a47
1 changed files with 2 additions and 2 deletions
|
@ -51,11 +51,11 @@ fn handle_edits_code() -> String {
|
|||
.then(bytes => {{
|
||||
// In headless mode, the requestAnimationFrame callback is never called, so we need to run the bytes directly
|
||||
if (headless) {{
|
||||
interpreter.run_from_bytes(bytes);
|
||||
window.interpreter.run_from_bytes(bytes);
|
||||
}}
|
||||
else {{
|
||||
requestAnimationFrame(() => {{
|
||||
interpreter.run_from_bytes(bytes);
|
||||
window.interpreter.run_from_bytes(bytes);
|
||||
}});
|
||||
}}
|
||||
window.interpreter.wait_for_request(headless);
|
||||
|
|
Loading…
Reference in a new issue