Clone in a terminal:
common.rs
tests/ - More tests
use kaja_web::prelude::*; use web_sys::HtmlElement; pub fn setup_test() { let window = web_sys::window().unwrap(); let document = window.document().unwrap(); let body = document.body().unwrap(); let test_div = document.get_element_by_id("test-div"); if test_div.is_some() { let test_div = test_div.unwrap().unchecked_into::<HtmlElement>(); test_div.set_inner_html(""); return; } let test_div = document.create_element("div").unwrap(); test_div.set_id("test-div"); body.append_child(&test_div).unwrap(); init_callbacks(); }

File history (1 commits)

b678d76 Johan Mattsson - johan.mattsson.m@gmail.com
More tests
More tests

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112