mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-01 20:32:13 +02:00
⚡ Docs
This commit is contained in:
14
docs/components/examples/elements/nativeCreateElement.js
Normal file
14
docs/components/examples/elements/nativeCreateElement.js
Normal file
@ -0,0 +1,14 @@
|
||||
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: "Element’s text content.", style: "color: coral;" }
|
||||
)
|
||||
);
|
Reference in New Issue
Block a user