Failed to execute 'initCustomEvent'

When I try some older watch code (web), I got this error but everything seems to work fine.

Uncaught TypeError: Failed to execute ‘initCustomEvent’ on ‘CustomEvent’: 4 arguments required, but only 3 present.

I don’t have any CustomEvent in my code. Any idea?