demo · v131

old async method vs new sync attribute

Two ways to read adapter info: the old async requestAdapterInfo() (removed in v131) and the new sync adapter.info attribute. Both presented side-by-side. Run each and see which works on your browser.

removed: adapter.requestAdapterInfo() (async)

const adapter = await navigator.gpu.requestAdapter();
const info = await adapter.requestAdapterInfo();
console.log(info.vendor, info.architecture);
removed in v131
click "try old API"

preferred: adapter.info (sync attribute)

const adapter = await navigator.gpu.requestAdapter();
const info = adapter.info;
console.log(info.vendor, info.architecture);
canonical (v131+)
click "try new API"

see also