Service 工作者测验
单选题 中等
题目
哪里做 service 工作者运行相对到 web page?
提示
它 cannot access DOM directly.
解释
Service 工作者运行 in separate thread, completely independent 的 web page. 它们 cannot access DOM directly — 它们 communicate 使用 page 通过 postMessage. 这个 separation lets 它们运行 in background, handle 推送 notifications, and serve cached 内容偶数当 page 是关闭.
相关资源
相关课程
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。