Documentation - - modal - API 56 When I try to fire an event from the modal window to the parent window - completely according to the example from the documentation - I get an error -
Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
Completely according to the example from the documentation
this.dispatchEvent(new CustomEvent('select', { detail: { id: 42 } })); The error occurs even at the moment the event is sent - not to mention the moment it is received
I'm waiting for an event but it doesn't happen
1 Answer
You have to enable Lightning Web Security Enabled in the org to get this working.
I've checked it myself and it's working well.