wasm-bindgen/crates/web-sys/tests/wasm/heading_element.rs

17 lines
443 B
Rust

use wasm_bindgen_test::*;
use wasm_bindgen::prelude::*;
use web_sys::HtmlHeadingElement;
#[wasm_bindgen(module = "./tests/wasm/element.js")]
extern {
fn new_heading() -> HtmlHeadingElement;
}
#[wasm_bindgen_test]
fn heading_element() {
let element = new_heading();
assert_eq!(element.align(), "", "Shouldn't have an align");
element.set_align("justify");
assert_eq!(element.align(), "justify", "Should have an align");
}