Function: toFront()
ts
function toFront(el): void;Moves the given element to the front of its parent's children.
Parameters
| Parameter | Type | Description |
|---|---|---|
el | HTMLElement | The element to move to the front. |
Returns
void
Example
ts
// Create a new element and add it to the DOM
const newDiv = document.createElement('div');
document.body.appendChild(newDiv);
// Move the new element to the front of the body
toFront(newDiv)Since
1.0.0