mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-25 02:31:35 +00:00
Add unit tests for various 'web-sys' HTML element bindings
That list includes: * HtmlOptionsCollection * HtmlOutputElement * HtmlParagraphElement * HtmlParamElement * HtmlPreElement * HtmlProgressElement * HtmlQuoteElement * HtmlSlotElement
This commit is contained in:
@ -1,7 +1,3 @@
|
||||
export function new_div() {
|
||||
return document.createElement("div");
|
||||
}
|
||||
|
||||
export function new_a() {
|
||||
return document.createElement("a");
|
||||
}
|
||||
@ -18,6 +14,10 @@ export function new_button() {
|
||||
return document.createElement("button");
|
||||
}
|
||||
|
||||
export function new_div() {
|
||||
return document.createElement("div");
|
||||
}
|
||||
|
||||
export function new_form() {
|
||||
return document.createElement("form");
|
||||
}
|
||||
@ -26,6 +26,10 @@ export function new_head() {
|
||||
return document.createElement("head");
|
||||
}
|
||||
|
||||
export function new_heading() {
|
||||
return document.createElement("h1");
|
||||
}
|
||||
|
||||
export function new_hr() {
|
||||
return document.createElement("hr");
|
||||
}
|
||||
@ -34,6 +38,38 @@ export function new_html() {
|
||||
return document.createElement("html");
|
||||
}
|
||||
|
||||
export function new_input() {
|
||||
return document.createElement("input");
|
||||
}
|
||||
|
||||
export function new_food_options_collection() {
|
||||
return new_select_with_food_opts().options;
|
||||
}
|
||||
|
||||
export function new_output() {
|
||||
return document.createElement("output");
|
||||
}
|
||||
|
||||
export function new_paragraph() {
|
||||
return document.createElement("p");
|
||||
}
|
||||
|
||||
export function new_param() {
|
||||
return document.createElement("param");
|
||||
}
|
||||
|
||||
export function new_pre() {
|
||||
return document.createElement("pre");
|
||||
}
|
||||
|
||||
export function new_progress() {
|
||||
return document.createElement("progress");
|
||||
}
|
||||
|
||||
export function new_quote() {
|
||||
return document.createElement("q");
|
||||
}
|
||||
|
||||
export function new_script() {
|
||||
return document.createElement("script");
|
||||
}
|
||||
@ -51,6 +87,10 @@ export function new_select_with_food_opts() {
|
||||
return select;
|
||||
}
|
||||
|
||||
export function new_slot() {
|
||||
return document.createElement("slot");
|
||||
}
|
||||
|
||||
export function new_span() {
|
||||
return document.createElement("span");
|
||||
}
|
||||
@ -59,18 +99,10 @@ export function new_style() {
|
||||
return document.createElement("style");
|
||||
}
|
||||
|
||||
export function new_input() {
|
||||
return document.createElement("input");
|
||||
}
|
||||
|
||||
export function new_title() {
|
||||
return document.createElement("title");
|
||||
}
|
||||
|
||||
export function new_heading() {
|
||||
return document.createElement("h1");
|
||||
}
|
||||
|
||||
export function new_xpath_result() {
|
||||
let xmlDoc = new DOMParser().parseFromString("<root><value>tomato</value></root>", "application/xml");
|
||||
let xpathResult = xmlDoc.evaluate("/root//value", xmlDoc, null, XPathResult.ANY_TYPE, null);
|
||||
|
Reference in New Issue
Block a user