GPUAdapterInfo: thuộc tính vendor

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

Thuộc tính chỉ đọc vendor của giao diện GPUAdapterInfo trả về tên của nhà cung cấp adapter, hoặc chuỗi rỗng nếu không có sẵn.

Giá trị

Một chuỗi.

Ví dụ

js
const adapter = await navigator.gpu.requestAdapter();
if (!adapter) {
  throw Error("Couldn't request WebGPU adapter.");
}

const adapterInfo = adapter.info;
console.log(adapterInfo.vendor);

Thông số kỹ thuật

Specification
WebGPU
# dom-gpuadapterinfo-vendor

Tương thích trình duyệt

Xem thêm