2018-07-30 18:14:50 +03:00
|
|
|
export function new_a() {
|
|
|
|
return document.createElement("a");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_body() {
|
|
|
|
return document.createElement("body");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_br() {
|
|
|
|
return document.createElement("br");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_button() {
|
|
|
|
return document.createElement("button");
|
|
|
|
}
|
|
|
|
|
2018-08-03 02:40:32 +03:00
|
|
|
export function new_del() {
|
|
|
|
return document.createElement("del");
|
|
|
|
}
|
|
|
|
|
2018-08-02 02:11:29 +03:00
|
|
|
export function new_div() {
|
|
|
|
return document.createElement("div");
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
export function new_form() {
|
|
|
|
return document.createElement("form");
|
|
|
|
}
|
|
|
|
|
2018-08-03 02:40:32 +03:00
|
|
|
export function new_food_options_collection() {
|
|
|
|
return new_select_with_food_opts().options;
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
export function new_head() {
|
|
|
|
return document.createElement("head");
|
|
|
|
}
|
|
|
|
|
2018-08-02 02:11:29 +03:00
|
|
|
export function new_heading() {
|
|
|
|
return document.createElement("h1");
|
|
|
|
}
|
|
|
|
|
2018-07-31 04:25:48 +03:00
|
|
|
export function new_hr() {
|
|
|
|
return document.createElement("hr");
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
export function new_html() {
|
|
|
|
return document.createElement("html");
|
|
|
|
}
|
|
|
|
|
2018-08-02 02:11:29 +03:00
|
|
|
export function new_input() {
|
|
|
|
return document.createElement("input");
|
|
|
|
}
|
|
|
|
|
2018-08-03 02:40:32 +03:00
|
|
|
export function new_ins() {
|
|
|
|
return document.createElement("ins");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_olist() {
|
|
|
|
return document.createElement("ol");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_optgroup() {
|
|
|
|
return document.createElement("optgroup");
|
2018-08-02 02:11:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
export function new_script() {
|
|
|
|
return document.createElement("script");
|
|
|
|
}
|
|
|
|
|
2018-08-01 08:01:03 +03:00
|
|
|
export function new_select_with_food_opts() {
|
|
|
|
let select = document.createElement("select");
|
|
|
|
let opts = ["tomato", "potato", "orange", "apple"];
|
|
|
|
|
|
|
|
for(let i = 0; i < opts.length; i++) {
|
|
|
|
let opt = document.createElement("option");
|
|
|
|
opt.value = opts[i];
|
|
|
|
opt.text = opts[i];
|
|
|
|
select.appendChild(opt);
|
|
|
|
}
|
|
|
|
return select;
|
|
|
|
}
|
|
|
|
|
2018-08-02 02:11:29 +03:00
|
|
|
export function new_slot() {
|
|
|
|
return document.createElement("slot");
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
export function new_span() {
|
|
|
|
return document.createElement("span");
|
|
|
|
}
|
|
|
|
|
|
|
|
export function new_style() {
|
|
|
|
return document.createElement("style");
|
|
|
|
}
|
|
|
|
|
2018-07-31 18:57:16 +03:00
|
|
|
export function new_title() {
|
|
|
|
return document.createElement("title");
|
|
|
|
}
|
|
|
|
|
2018-07-30 18:14:50 +03:00
|
|
|
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);
|
|
|
|
return xpathResult;
|
|
|
|
}
|