js: declare iosUsingObject option

This commit is contained in:
王劲鹏
2023-03-22 17:17:12 +08:00
committed by osborn
parent b1c4ccd944
commit dc016b9507
10 changed files with 102 additions and 66 deletions

View File

@@ -5114,12 +5114,20 @@ function animate(context) {
function notification(context) {
return {
/**
* @param androidSystem: when set true, using global broadcast instead of local broadcast by default
* @param iosUsingObject: when set true, using object instead of userInfo by default
*/
publish: (args) => {
if (args.data !== undefined) {
args.data = JSON.stringify(args.data);
}
return context.callNative('notification', 'publish', args);
},
/**
* @param androidSystem: when set true, using global broadcast instead of local broadcast by default
* @param iosUsingObject: when set true, using object instead of userInfo by default
*/
subscribe: (args) => {
args.callback = context.function2Id(args.callback);
return context.callNative('notification', 'subscribe', args);

File diff suppressed because one or more lines are too long