处理事件无法正常接收的问题

This commit is contained in:
范大德 2023-08-10 22:39:15 +08:00
parent 74813467e7
commit 9e516832dc

View File

@ -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);
});
```