From 0be532acd474d9ccfc0593fd0f956e04a1c029ea Mon Sep 17 00:00:00 2001 From: ygj6 <7699524+ygj6@users.noreply.github.com> Date: Thu, 16 Dec 2021 20:23:12 +0800 Subject: [PATCH] test: correct the confusing test case (#6139) --- packages/playground/worker/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/playground/worker/index.html b/packages/playground/worker/index.html index 1ce429eece42cc..20888835122fac 100644 --- a/packages/playground/worker/index.html +++ b/packages/playground/worker/index.html @@ -59,12 +59,12 @@ sharedWorker.port.start() const tsOutputWorker = new TSOutputWorker() - worker.addEventListener('message', (e) => { + tsOutputWorker.addEventListener('message', (e) => { text('.pong-ts-output', e.data.msg) }) document.querySelector('.ping-ts-output').addEventListener('click', () => { - inlineWorker.postMessage('ping') + tsOutputWorker.postMessage('ping') }) function text(el, text) {