Google chrome extension 通知框中未显示通知操作按钮
有人能给出包含按钮的chrome通知的语法吗?我不确定在chrome中向通知框添加按钮的语法。有人能帮我吗?? 这是我的通知代码Google chrome extension 通知框中未显示通知操作按钮,google-chrome-extension,notifications,Google Chrome Extension,Notifications,有人能给出包含按钮的chrome通知的语法吗?我不确定在chrome中向通知框添加按钮的语法。有人能帮我吗?? 这是我的通知代码 chrome.notifications.create( 'id1',{ type: 'basic', iconUrl: '/icon_128.png', title: 'Althe Frazon', message: 'Lorem ipsum', buttons: [{ title: 'Call'
chrome.notifications.create(
'id1',{
type: 'basic',
iconUrl: '/icon_128.png',
title: 'Althe Frazon',
message: 'Lorem ipsum',
buttons: [{ title: 'Call'
},
{ title: 'Send Email'
}],
priority: 0
},
function() { /* Error checking goes here */}
);
notification.show();
使用此代码可以显示通知。但是按钮没有显示。如果出现任何问题,请猜测原因。为什么我的按钮没有显示?请帮助我如果有人登录此页面,希望找到向通知添加按钮的方法,或者试图找出为什么没有显示按钮:
详细说明如何创建通知以及如何添加按钮
尽管如此,这些按钮在Linux的某些发行版上并不显示。这是(仍然适用于Chrome 31.0.1650.57版),并且依赖于Linux上的
视图。创建并显示通知,因此不需要通知。show()
。(它到底指的是什么?)似乎是一个已知的问题:@user1991:Hm…似乎是一个依赖操作系统的问题。你在用什么操作系统?