說明
使用 chrome.enterprise.hardwarePlatform
API,取得執行瀏覽器的硬體平台製造商和型號。注意:這個 API 僅適用於透過企業政策安裝的擴充功能。
權限
enterprise.hardwarePlatform
適用國家/地區
Chrome 71 以上版本
需要政策
類型
HardwarePlatformInfo
屬性
-
製造商
字串
-
model
字串
方法
getHardwarePlatformInfo()
Promise
chrome.enterprise.hardwarePlatform.getHardwarePlatformInfo(
callback?: function,
)
取得硬體平台的製造商和型號。如果擴充功能已獲授權,即可透過 callback
傳回。
參數
-
回呼
函式選用
callback
參數如下所示:(info: HardwarePlatformInfo)=>void
傳回
-
Promise<HardwarePlatformInfo>
Chrome 96 以上版本Promise 僅支援 Manifest V3 以上版本,其他平台就必須使用回呼。