fix toString for some web objects (#2040)

This commit is contained in:
迷渡 2019-04-03 20:41:05 +08:00 committed by Ryan Dahl
parent 5f97c041d9
commit bb617d2478
8 changed files with 37 additions and 0 deletions

View file

@ -19,3 +19,9 @@ test(function customEventInitializedWithDetail() {
assertEquals(event.target, null);
assertEquals(event.type, type);
});
test(function toStringShouldBeWebCompatibility() {
const type = "touchstart";
const event = new CustomEvent(type, {});
assertEquals(event.toString(), "[object CustomEvent]");
});