PushMessageData.json()
PushMessageData
(en-US) 接口的 **json()
**方法将推送消息数据提取为 一个 JSON 对象。
Syntax
js
let massage_Json = PushEvent.data.json();
Parameters
None.
Returns
A JSON object.
Examples
js
self.addEventListener("push", function (event) {
var jsonObj = event.data.json();
// do something with your JSON
});
Specifications
Specification |
---|
Push API # dom-pushmessagedata-json |
Browser Compatibility
BCD tables only load in the browser