events: deal with Symbol() passed to event constructor
Align behavior of Event
constructor when a symbol is passed with what the DOM does.
Old behavior:
-
new Event(Symbol())
creates an event with type "Symbol()" New behavior: -
new Event(Symbol())
throws an error (like browsers do).
cc @jasnell
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines