这是indexloc提供的服务,不要输入任何密码
Skip to content

Make GPUAdapterInfo a dictionary instead of an interface? #4876

@saschanaz

Description

@saschanaz
[Exposed=(Window, Worker), SecureContext]
interface GPUAdapterInfo {
    readonly attribute DOMString vendor;
    readonly attribute DOMString architecture;
    readonly attribute DOMString device;
    readonly attribute DOMString description;
};

This interface solely includes readonly strings and nothing else, can we make this dictionary? An interface requires more boilerplates and web-exposed objects than a dictionary.

This also applies other Info interfaces, but this one seems easier to change given the spec recently changed how to retrieve the interface (#4662). Note that retrieving a dictionary requires a method than an attribute, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU API

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions