From c3315a2b65f7ef146fd5f8b84b0596520f03c4a4 Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Tue, 29 Mar 2022 21:35:41 +0200 Subject: [PATCH] fix setting `update_listener` and show the deprecation notice of `getAllUpdates` to the user with console.error --- res/raw/webxdc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/raw/webxdc.js b/res/raw/webxdc.js index fb3879679..cfd78f968 100644 --- a/res/raw/webxdc.js +++ b/res/raw/webxdc.js @@ -17,11 +17,13 @@ window.webxdc = (() => { setUpdateListener: (cb, serial) => { last_serial = typeof serial === "undefined" ? 0 : parseInt(serial); + update_listener = cb window.__webxdcUpdate(); }, // deprecated 2022-02-20 all updates are returned through the callback set by setUpdateListener getAllUpdates: () => { + console.error("deprecated 2022-02-20 all updates are returned through the callback set by setUpdateListener") return Promise.resolve([]); },