mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +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 => {{
|
.then(bytes => {{
|
||||||
// In headless mode, the requestAnimationFrame callback is never called, so we need to run the bytes directly
|
// In headless mode, the requestAnimationFrame callback is never called, so we need to run the bytes directly
|
||||||
if (headless) {{
|
if (headless) {{
|
||||||
interpreter.run_from_bytes(bytes);
|
window.interpreter.run_from_bytes(bytes);
|
||||||
}}
|
}}
|
||||||
else {{
|
else {{
|
||||||
requestAnimationFrame(() => {{
|
requestAnimationFrame(() => {{
|
||||||
interpreter.run_from_bytes(bytes);
|
window.interpreter.run_from_bytes(bytes);
|
||||||
}});
|
}});
|
||||||
}}
|
}}
|
||||||
window.interpreter.wait_for_request(headless);
|
window.interpreter.wait_for_request(headless);
|
||||||
|
|
Loading…
Reference in a new issue