From 49f3d0c24a0baf2a74d233546d7a3d299cf0edc8 Mon Sep 17 00:00:00 2001 From: Vasiliy Zhukov Date: Fri, 31 May 2024 21:42:57 +0200 Subject: [PATCH] rollback spread operator usage --- src/browser/dummy_screen.js | 10 +++++----- src/browser/screen.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/browser/dummy_screen.js b/src/browser/dummy_screen.js index 5ba0148c31..50e61ec230 100644 --- a/src/browser/dummy_screen.js +++ b/src/browser/dummy_screen.js @@ -58,7 +58,7 @@ function DummyScreenAdapter(bus) bus.register("screen-put-char", function(data) { //console.log(data); - this.put_char(...data); + this.put_char(data[0], data[1], data[2], data[3], data[4], data[5]); }, this); bus.register("screen-text-scroll", function(rows) @@ -68,20 +68,20 @@ function DummyScreenAdapter(bus) bus.register("screen-update-cursor", function(data) { - this.update_cursor(...data); + this.update_cursor(data[0], data[1]); }, this); bus.register("screen-update-cursor-scanline", function(data) { - this.update_cursor_scanline(...data); + this.update_cursor_scanline(data[0], data[1]); }, this); bus.register("screen-set-size-text", function(data) { - this.set_size_text(...data); + this.set_size_text(data[0], data[1]); }, this); bus.register("screen-set-size-graphical", function(data) { - this.set_size_graphical(...data); + this.set_size_graphical(data[0], data[1]); }, this); this.put_char = function(row, col, chr, blinking, bg_color, fg_color) diff --git a/src/browser/screen.js b/src/browser/screen.js index 721b1e433d..8c60cff6bf 100644 --- a/src/browser/screen.js +++ b/src/browser/screen.js @@ -146,16 +146,16 @@ function ScreenAdapter(screen_container, bus) bus.register("screen-put-char", function(data) { //console.log(data); - this.put_char(...data); + this.put_char(data[0], data[1], data[2], data[3], data[4], data[5]); }, this); bus.register("screen-update-cursor", function(data) { - this.update_cursor(...data); + this.update_cursor(data[0], data[1]); }, this); bus.register("screen-update-cursor-scanline", function(data) { - this.update_cursor_scanline(...data); + this.update_cursor_scanline(data[0], data[1]); }, this); bus.register("screen-clear", function() @@ -165,11 +165,11 @@ function ScreenAdapter(screen_container, bus) bus.register("screen-set-size-text", function(data) { - this.set_size_text(...data); + this.set_size_text(data[0], data[1]); }, this); bus.register("screen-set-size-graphical", function(data) { - this.set_size_graphical(...data); + this.set_size_graphical(data[0], data[1], data[2], data[3]); }, this);