什么样的信息服务工作者对自己有什么?
我想问“如何从内部服务人员那里获得服务工作者的位置?”但是我发现了这个问题获取服务工作者ID或从服务工作者中的日期发现任何有用的东西。
因此,我的问题是从工人内部有关于服务人员的任何信息。或要有任何元数据,我需要向工人发布一条消息。
我对工人的URL或安装工人安装的网站的URL感兴趣,因为我需要此URL来路由工人内部。
I wanted to ask "How to get the location of the service worker from the inside service worker?" but I've found this question get service worker id or date from within service worker, I was looking at the spec but didn't found anything useful.
So my question is are there any information about the service worker from inside the worker. Or to have any metadata I need to post a message to the worker.
I'm interested in the URL of the worker or the URL of the website where the worker was installed since I need this URL for routing inside the worker.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来,服务人员内部有一个位置指向工人文件名的URL。
到达工人安装的根路径(我需要的)您可以使用:
It seems that there is a location inside service worker that points to the URL of the worker filename.
To the path of the root where worker was installed (which is what I need) you can use: