QuotaExceededError: QuotaExceededError() constructor

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The QuotaExceededError() constructor creates a new QuotaExceededError object.

Syntax

js
new QuotaExceededError()
new QuotaExceededError(message)
new QuotaExceededError(message, options)

Parameters

message Optional

The message. Defaults to "".

options Optional

An object that can have the following properties:

quota Optional

A number representing the system-defined storage quota (in bytes) that was exceeded, or undefined if the information isn't available. Corresponds to QuotaExceededError.quota.

requested Optional

A number representing the amount of storage (in bytes) that was requested during the operation, or undefined if the information isn't available. Corresponds to QuotaExceededError.requested.

Exceptions

RangeError

Thrown if option.quota or options.requested is negative, or if option.requested < option.quota.

Specifications

Specification
Web IDL
# dom-quotaexceedederror-quotaexceedederror

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
QuotaExceededError() constructor
Experimental
Chrome – Full support
Chrome 138 (Release date: 2025-06-24)
footnote Full support
Edge – Full support
Edge 138 (Release date: 2025-06-26)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 122 (Release date: 2025-09-11)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 138 (Release date: 2025-06-24)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 91 (Release date: 2025-08-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 138 (Release date: 2025-06-24)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also