PreloadScriptRegistration 物件
type
字串 - 預載腳本將執行的上下文類型。可能的值包括frame
或service-worker
。id
字串 (選填) - 預載腳本的唯一 ID。預設為隨機 UUID。filePath
字串 - 腳本檔案的路徑。必須是絕對路徑。
@electron
套件在 npm 上將會需要 Node.js 22 LTS。在我們的部落格閱讀更多資訊。type
字串 - 預載腳本將執行的上下文類型。可能的值包括 frame
或 service-worker
。id
字串 (選填) - 預載腳本的唯一 ID。預設為隨機 UUID。filePath
字串 - 腳本檔案的路徑。必須是絕對路徑。