is it possible to wait for dom element to load in a function code example
Example: wait for the dom to load javascript
document.addEventListener('DOMContentLoaded', (event) => {
//the event occurred
})
document.addEventListener('DOMContentLoaded', (event) => {
//the event occurred
})