createElement is
document.createElement,
pre-bound to document so it can be passed around and called without
a receiver. The export itself is undefined when there is no
document (non-browser environment). Part of
pota/use/dom.
| Argument | Type | Description |
|---|---|---|
tagName |
string |
The HTML tag name of the element to create. |
options |
ElementCreationOptions |
Optional; e.g. { is } for custom elements. |
Returns: HTMLElement — the newly created element.