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

Update QuotaExceededError to a DOMException derived interface #468

@ayuishii

Description

@ayuishii

WebKittens

@annevk

Title of the proposal

Update QuotaExceededError to a DOMException derived interface

URL to the spec

https://webidl.spec.whatwg.org/#idl-DOMException

URL to the spec's repository

https://github.com/whatwg/webidl

Issue Tracker URL

No response

Explainer URL

whatwg/webidl#1465

TAG Design Review URL

No response

Mozilla standards-positions issue URL

whatwg/html#10972

WebKit Bugzilla URL

No response

Radar URL

No response

Description

Currently, when the web platform wants to tell you when you've exceeded quota, it will use DOMException with the specific name property set to QuotaExceededError. However this does not allow carrying additional information.

This proposes removing "QuotaExceededError" from the list of built-in DOMException names, and instead creates a class name QuotaExceededError from the list of built-in DOMException and has the additional optional properties quota and requested. We propose all instances of specs that throw "QuotaExceededError" DOMExceptions get upgraded to instead throw QuotaExceededErrors. For now, such specs would leave the quota and requested properties at their default value of null, but they could eventually upgrade to include that data, if it's useful for their use case (and isn't, e.g., a privacy leak).

The proposal PR outlines scenarios where this change may not be backward-incompatible. However, think they are rare coding patterns and anticipate low interoperability risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from: GoogleProposed, edited, or co-edited by Google.topic: web apisSpec relates to web APIs (entry points for script)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions