gpt4 book ai didi

google-chrome - Chrome 扩展开发 : auto close the notification box

转载 作者:行者123 更新时间:2023-12-04 09:05:47 24 4
gpt4 key购买 nike

做一些事情后,我运行此代码:

var notification = webkitNotifications.createNotification(
'icon.png', // icon url - can be relative
'Done!', // notification title
'Just updated your list!' // notification body text
);
notification.show();

这当然会在用户屏幕中弹出通知。

无论如何要计时此通知,以便它在 X 秒内自动关闭?

谢谢!
电阻

最佳答案

您可以使用 notification.cancel();

关于google-chrome - Chrome 扩展开发 : auto close the notification box,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5732031/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com