From bb617d24781d7c1e67e8e825cc07faba9a5df075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Wed, 3 Apr 2019 20:41:05 +0800 Subject: fix toString for some web objects (#2040) --- js/custom_event_test.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/custom_event_test.ts') diff --git a/js/custom_event_test.ts b/js/custom_event_test.ts index 20c901303..2f8f5c1a0 100644 --- a/js/custom_event_test.ts +++ b/js/custom_event_test.ts @@ -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]"); +}); -- cgit v1.2.3