From 659acadf77fdbeef8579a37839a464feb408437a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=B7=E6=B8=A1?= Date: Tue, 2 Apr 2019 01:05:19 +0800 Subject: Improve new TextDecoder().toString() (#2032) --- js/text_encoding.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/text_encoding.ts') diff --git a/js/text_encoding.ts b/js/text_encoding.ts index 364a0f020..a9d0d74b1 100644 --- a/js/text_encoding.ts +++ b/js/text_encoding.ts @@ -442,6 +442,9 @@ export class TextDecoder { return codePointsToString(output); } + get [Symbol.toStringTag]() { + return "TextDecoder"; + } } export class TextEncoder { @@ -467,4 +470,7 @@ export class TextEncoder { return new Uint8Array(output); } + get [Symbol.toStringTag]() { + return "TextEncoder"; + } } -- cgit v1.2.3