From 9e516832dcea2b4023a4ff356ff27beac2bcf6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=A4=A7=E5=BE=B7?= Date: Thu, 10 Aug 2023 22:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=BA=8B=E4=BB=B6=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=8E=A5=E6=94=B6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0451eed..e39d879 100644 --- a/README.md +++ b/README.md @@ -98,17 +98,17 @@ Tpns.clearAndAppendTags(new nanoId(),['tag1','tag2'],console.log,console.error); ```javascript // 接收消息事件 -window.addEventListener(Tpns.Constant.EVENT_ON_TEXT_MESSAGE,function(event){ +document.addEventListener(Tpns.Constant.EVENT_ON_TEXT_MESSAGE,function(event){ console.log("接收到消息:",event); }); // 已显示通知 -window.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_SHOWED_RESULT,function(event){ +document.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_SHOWED_RESULT,function(event){ console.log("已显示通知:",event); }); // 消息点击事件 -window.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_CLICKED_RESULT,function(event){ +document.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_CLICKED_RESULT,function(event){ console.log("消息点击事件:",event); }); ```