js create custom event on window code example
Example: custom event js
const eventDetails = {
'id': elemId
}
document.dispatchEvent (
new CustomEvent('myCustomEvent', {'detail': eventDetails})
)
const eventDetails = {
'id': elemId
}
document.dispatchEvent (
new CustomEvent('myCustomEvent', {'detail': eventDetails})
)