mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-19 19:50:52 +00:00
* Adding in initial support for all HTML*Element interfaces. * Fix camelcasing of short HTML interface names * Disabling span test as breaks on taskcluster
34 lines
924 B
Rust
34 lines
924 B
Rust
use super::websys_project;
|
|
|
|
#[test]
|
|
fn span_element() {
|
|
websys_project()
|
|
.file(
|
|
"src/lib.rs",
|
|
r#"
|
|
#![feature(use_extern_macros, wasm_custom_section)]
|
|
extern crate wasm_bindgen;
|
|
use wasm_bindgen::prelude::*;
|
|
extern crate web_sys;
|
|
|
|
#[wasm_bindgen]
|
|
pub fn test_span_element(_element: &web_sys::HtmlSpanElement) {
|
|
assert!(true, "Span doesn't have an interface");
|
|
}
|
|
"#,
|
|
)
|
|
.file(
|
|
"test.js",
|
|
r#"
|
|
import * as assert from "assert";
|
|
import * as wasm from "./out";
|
|
|
|
export function test() {
|
|
let span = document.createElement("span");
|
|
wasm.test_span_element(span);
|
|
}
|
|
"#,
|
|
)
|
|
.test();
|
|
}
|