refresh date: 2026-09-25 robots: noindex
說明
使用 chrome.enterprise.hardwarePlatform API 取得執行瀏覽器的硬體平台製造商和型號。注意:這個 API 僅適用於透過企業政策安裝的擴充功能。
權限
enterprise.hardwarePlatform可用性
Chrome 71 以上版本
需要政策
類型
HardwarePlatformInfo
屬性
-
製造商
字串
-
模型
字串
方法
getHardwarePlatformInfo()
Promise
chrome.enterprise.hardwarePlatform.getHardwarePlatformInfo(
callback?: function,
): Promise<HardwarePlatformInfo>
取得硬體平台的製造商和型號,並在擴充功能獲得授權時,透過 callback 傳回。
參數
-
callback
函式 選填
callback參數如下:(info: HardwarePlatformInfo) => void
傳回
-
Promise<HardwarePlatformInfo>
Chrome 96 以上版本傳回 Promise,其會解析硬體平台資訊。
Promise 僅適用於 Manifest V3 以上版本,其他平台則須使用回呼。