处理事件无法正常接收的问题
This commit is contained in:
parent
74813467e7
commit
9e516832dc
@ -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);
|
||||
});
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user