Skip to main content
Version: 24.38.0

BrowserProvider.supports() 方法

🌐 BrowserProvider.supports() method

检查此提供商是否支持指定的浏览器/平台。用于在尝试下载前进行筛选。

🌐 Check if this provider supports the given browser/platform. Used for filtering before attempting downloads.

可以是同步的以进行快速检查,或者如果需要版本解析/网络请求,则可以是异步的。

🌐 Can be synchronous for quick checks or asynchronous if version resolution/network requests are needed.

语法

🌐 Signature

interface BrowserProvider {
supports(options: DownloadOptions): Promise<boolean> | boolean;
}

参数

🌐 Parameters

范围

🌐 Parameter

类型

🌐 Type

描述

🌐 Description

options

下载选项

下载选项以检查

🌐 Download options to check

返回:

Promise<boolean> | boolean

如果此提供器支持该浏览器/平台组合,则为真

🌐 True if this provider supports the browser/platform combination