From 0bf0ef59a33616a3f90b98d855638b94558615e3 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 11 Nov 2020 10:34:36 +0800 Subject: [PATCH] webworker --- dist/fix/worker.compact.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/fix/worker.compact.js b/dist/fix/worker.compact.js index ad72d227e..43264e284 100644 --- a/dist/fix/worker.compact.js +++ b/dist/fix/worker.compact.js @@ -16,7 +16,7 @@ }; var _initRender = BI.Widget.prototype._initRender; - BI.Widget.prototype.postMessage = function (data) { + var postMessage = function (data) { switch (data.eventType) { case "create": this.model = data.msg; @@ -49,7 +49,7 @@ worker.addEventListener("message", function (e) { var data = e.data; - contexts[data.name].postMessage(data); + postMessage.apply(contexts[data.name], [data]); }, false); };