diff options
| author | 2022-08-10 18:45:30 -0700 | |
|---|---|---|
| committer | 2022-08-10 18:45:30 -0700 | |
| commit | 00d5f6699b39799b383dc305d4120da7d79c7bce (patch) | |
| tree | df7f45fabd4508110f0fdff17094e0f06bcdd078 | |
| parent | 3ca4bab2d565db9c87dc064bd52f83eb50bd4586 (diff) | |
| download | bun-00d5f6699b39799b383dc305d4120da7d79c7bce.tar.gz bun-00d5f6699b39799b383dc305d4120da7d79c7bce.tar.zst bun-00d5f6699b39799b383dc305d4120da7d79c7bce.zip | |
Add `Event` JSType
| -rw-r--r-- | src/bun.js/bindings/bindings.zig | 1 | ||||
| -rw-r--r-- | src/bun.js/bindings/exports.zig | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig index f44f446a6..9ba5742eb 100644 --- a/src/bun.js/bindings/bindings.zig +++ b/src/bun.js/bindings/bindings.zig @@ -2141,6 +2141,7 @@ pub const JSValue = enum(JSValueReprInt) { // End StringObject s. MaxJS = 0b11111111, + Event = 0b11101111, _, pub fn isObject(this: JSType) bool { diff --git a/src/bun.js/bindings/exports.zig b/src/bun.js/bindings/exports.zig index 3f3607117..e9447897d 100644 --- a/src/bun.js/bindings/exports.zig +++ b/src/bun.js/bindings/exports.zig @@ -1885,6 +1885,9 @@ pub const ZigConsoleClient = struct { { this.indent += 1; defer this.indent -|= 1; + const old_quote_strings = this.quote_strings; + this.quote_strings = true; + defer this.quote_strings = old_quote_strings; if (className.eqlComptime("MessageEvent")) { this.writeIndent(Writer, writer_) catch unreachable; writer.print( @@ -1894,7 +1897,7 @@ pub const ZigConsoleClient = struct { const data = value.get(this.globalThis, "data").?; const tag = Tag.get(data, this.globalThis); if (tag.cell.isStringLike()) { - this.printAs(.String, Writer, writer_, data, tag.cell, enable_ansi_colors); + this.format(tag, Writer, writer_, data, this.globalThis, enable_ansi_colors); } else { this.format(tag, Writer, writer_, data, this.globalThis, enable_ansi_colors); } |
