custom event listener js 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})
)