nsIPushMessage 编辑
dom/interfaces/push/nsIPushNotifier.idl
Scriptable A push message sent to a system subscription. Inherits from: nsISupports
Last changed in Gecko 46.0 (Firefox 46.0 / Thunderbird 46.0 / SeaMonkey 2.43)nsIPushMessage
is the subject of a push-message
observer notification.
This interface resembles PushMessageData
from the Push API.
Method overview
DOMString text(); |
jsval json(); |
void binary([optional] out uint32_t dataLen, [array, retval, size_is(dataLen)] out uint8_t data); |
Methods
text()
Extracts the message data as a UTF-8 text string.
DOMString text();
Parameters
None.
json()
Parses the message data as JSON.
jsval json();
Parameters
None.
binary()
Extracts the message data as a byte array.
void binary( [optional] out uint32_t dataLen, [array, retval, size_is(dataLen)] out uint8_t data );
Parameters
dataLen
- The data size.
data
- The byte array containing the data.
dataLen
and data
are out parameters. When called from JavaScript, nsIPushMessage.binary()
returns data
. Please see Method parameters in XPIDL for more details on using out parameters in JavaScript.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论