ServiceWorkerInfo 物件
scriptUrl
字串 - 此 Service Worker 執行的腳本完整 URLscope
字串 - 此 Service Worker 啟用的基礎 URL。renderProcessId
數字 - 此 Service Worker 執行所在程序的虛擬 ID。這不是作業系統層級的 PID。這與用於webContents.getProcessId()
的 ID 設定一致。versionId
數字 - Service Worker 版本的 ID
@electron
套件將需要 Node.js 22 LTS。在我們的部落格上閱讀更多資訊。scriptUrl
字串 - 此 Service Worker 執行的腳本完整 URLscope
字串 - 此 Service Worker 啟用的基礎 URL。renderProcessId
數字 - 此 Service Worker 執行所在程序的虛擬 ID。這不是作業系統層級的 PID。這與用於 webContents.getProcessId()
的 ID 設定一致。versionId
數字 - Service Worker 版本的 ID