GPUCompilationMessage: message property
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 message của giao diện GPUCompilationMessage là một chuỗi đại diện cho văn bản thông báo có thể đọc được.
Giá trị
Một chuỗi.
Ví dụ
js
const shaderModule = device.createShaderModule({
code: shaders,
});
const shaderInfo = await shaderModule.getCompilationInfo();
const firstMessage = shaderInfo.messages[0];
console.log(firstMessage.message);
Xem trang chính GPUCompilationInfo để biết ví dụ chi tiết hơn.
Thông số kỹ thuật
| Specification |
|---|
| WebGPU> # dom-gpucompilationmessage-message> |