fix headless tests on desktop
This commit is contained in:
1 parent
271b53e866
commit
acbc1f6a47
1 file changed
+2
-2
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user