From 29bd7787578db19c05cc423b0ea0c6345fe0c6aa Mon Sep 17 00:00:00 2001 From: Haocen Date: Tue, 13 Sep 2022 08:33:03 -0400 Subject: [PATCH] Implement off method for Events class --- client/scripts/network.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/scripts/network.js b/client/scripts/network.js index eb59901..7f50e67 100644 --- a/client/scripts/network.js +++ b/client/scripts/network.js @@ -512,6 +512,10 @@ class Events { static on(type, callback) { return window.addEventListener(type, callback, false); } + + static off(type, callback) { + return window.removeEventListener(type, callback, false); + } }