添加事件监听相关信息
This commit is contained in:
parent
a1aea88de6
commit
4b8299007c
19
README.md
19
README.md
@ -94,4 +94,23 @@ Tpns.upsertAccounts([{
|
|||||||
Tpns.clearAndAppendTags(new nanoId(),['tag1','tag2'],console.log,console.error);
|
Tpns.clearAndAppendTags(new nanoId(),['tag1','tag2'],console.log,console.error);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### 4. 事件监听
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// 接收消息事件
|
||||||
|
window.addEventListener(Tpns.Constant.EVENT_ON_TEXT_MESSAGE,function(event){
|
||||||
|
console.log("接收到消息:",event);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 已显示通知
|
||||||
|
window.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_SHOWED_RESULT,function(event){
|
||||||
|
console.log("已显示通知:",event);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 消息点击事件
|
||||||
|
window.addEventListener(Tpns.Constant.EVENT_ON_NOTIFICATION_CLICKED_RESULT,function(event){
|
||||||
|
console.log("消息点击事件:",event);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
##### 5.其他方法参考js注释
|
##### 5.其他方法参考js注释
|
||||||
|
Loading…
x
Reference in New Issue
Block a user