[英]How to call function in certain time interval
I need to run a certain API function, in a certain time period once the access token is granted, and check the status and inform the user if there any changes. 一旦授予访问令牌,我需要在特定时间段内运行某个API函数,并检查状态并通知用户是否有任何更改。
So far i did it by clicking a button on popup window of the firefox addon and calling the functions background js files, so i can receive the info from the API and notify the user. 到目前为止,我是通过在firefox插件的弹出窗口上单击一个按钮并调用函数background js文件来做到这一点的,因此我可以从API接收信息并通知用户。 But i need to automate this process in background js files.
但是我需要在后台js文件中自动执行此过程。
Are there any firefox inbuild JS API or any other way to achieve this auto API request calling from addon background files? 是否有任何firefox内置JS API或任何其他方式来实现从插件后台文件调用此自动API请求?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.