e01.org

GPUQueue: label property

WebGPU API

WebGPU API

The **`label`** property of the
GPUQueue interface is a string providing a label that can be used to identify the object, for example in GPUError messages or console warnings.

You can get and set it directly on the `GPUQueue` object.

## Value

A string. If no label value has previously been set, getting the label returns an empty string.

## Examples

Setting and getting a label via `GPUQueue.label`:

```js
device.queue.label = "my_queue";
console.log(device.queue.label); // "my_queue"
```

You can also set the queue's label at the time you request the device, like this:

```js
const device = adapter.requestDevice({
defaultQueue: { label: "my_queue" },
});
```

## Specifications

## Browser compatibility

## See also

- The [WebGPU API](/docs/Web/API/WebGPU_API)

source: MDN Web Docs mirror · page

Cite this

"GPUQueue: label property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/GPUQueue/label

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·