"You can create a native DOM element by using the ",
el("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement",title:"MDN documentation for document.createElement()"}).append(
el("code","document.createElement()")
),". ",
"It is also possible to provide asome attribute(s) declaratively using ",el("code","Object.assign()"),". ",
"The ",el("code","assign")," function provides improved behaviour of ",el("code","Object.assign()"),". ",
"You can declaratively sets any IDL and attribute of the given element. ",
"Function prefers IDL and fallback to the ",el("code","element.setAttribute")," if there is no writable property in the element prototype."
),
el("p").append(
"You can study all JavaScript elements interfaces to the corresponding HTML elements. ",
"All HTML elements inherits from ",el("a",{textContent:"HTMLElement",href:"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"}),". ",
"To see all available IDLs for example for paragraphs, see ",el("a",{textContent:"HTMLParagraphElement",href:"https://developer.mozilla.org/en-US/docs/Web/API/HTMLParagraphElement"}),". ",
"Moreover, the ",el("code","assign")," provides away to sets declaratively some convenient properties:"
),
el("ul").append(
el("li").append(
"It is possible to sets ",el("code","data-*"),"/",el("code","aria-*")," attributes using object notation."
),
el("li").append(
"In opposite, it is also possible to sets ",el("code","data-*"),"/",el("code","aria-*")," attribute using camelCase notation."
"As you can see, in case of state-less/basic components there is no difference",
" between calling component function directly or using ",el("code","el")," function.",
),
el("p",{className:"notice"}).append(
"It is nice to use similar naming convention as native DOM API. ",
"This allows us to use ",el("a",{textContent:"the destructuring assignment syntax",href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment",title:"Destructuring assignment | MDN"}),
" and keep track of the native API (things are best remembered through regular use).",
),
el(h3,"Creating non-HTML elements"),
el("p").append(
"Similarly to the native DOM API (",el("a",{href:"https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS",title:"MDN"}).append(el("code","document.createElementNS")),") for non-HTML elements",
" we need to tell JavaScript which kind of the element to create.",