Display searched journey on drafting board
This commit is contained in:
15
web/dom.js
Normal file
15
web/dom.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export function EL(type, properties) {
|
||||
let el = document.createElement(type);
|
||||
|
||||
if ("class" in properties) {
|
||||
for (let c of properties["class"]) {
|
||||
el.classList.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
if ("style" in properties) {
|
||||
Object.assign(el.style, properties.style);
|
||||
}
|
||||
|
||||
return el;
|
||||
}
|
Reference in New Issue
Block a user