1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-25 17:49:37 +01:00
deka-dom-el/docs_src/components/examples/elements/nativeCreateElement.js

15 lines
309 B
JavaScript
Raw Normal View History

2023-11-06 13:45:43 +01:00
document.body.append(
document.createElement("div")
);
console.log(
"Emty div is generated inside <body>:",
document.body.innerHTML.includes("<div></div>")
);
document.body.append(
Object.assign(
document.createElement("p"),
{ textContent: "Elements text content.", style: "color: coral;" }
)
);