Skip to content

Commit abb4ae5

Browse files
committed
Update QuotaExceededError usage
QuotaExceededError is graduating from being a DOMException name into a new error class, in whatwg/webidl#1465. Update creation sites to reflect this. For now, the quota and requested properties are left at their default (null). Future work could include setting them in an informative fashion.
1 parent ea29ce1 commit abb4ae5

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

source

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,8 +2919,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29192919
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#dfn-set-entries">set entries</dfn></li>
29202920
</ul>
29212921

2922-
<p><cite>Web IDL</cite> also defines the following types that are used in Web IDL fragments in
2923-
this specification:</p>
2922+
<p><cite>Web IDL</cite> also defines the following types that are used in this specification:</p>
29242923

29252924
<ul class="brief">
29262925
<li><dfn data-x="idl-ArrayBuffer" data-x-href="https://webidl.spec.whatwg.org/#idl-ArrayBuffer"><code>ArrayBuffer</code></dfn></li>
@@ -2939,6 +2938,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29392938
<li><dfn data-x="idl-unsigned-long" data-x-href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><code>unsigned long</code></dfn></li>
29402939
<li><dfn data-x="idl-USVString" data-x-href="https://webidl.spec.whatwg.org/#idl-USVString"><code>USVString</code></dfn></li>
29412940
<li><dfn data-x="idl-VoidFunction" data-x-href="https://webidl.spec.whatwg.org/#VoidFunction"><code>VoidFunction</code></dfn></li>
2941+
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#quotaexceedederror"><code>QuotaExceededError</code></dfn></li>
29422942
</ul>
29432943

29442944
<p>The term <dfn data-x-href="https://webidl.spec.whatwg.org/#dfn-throw">throw</dfn> in this
@@ -2960,7 +2960,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29602960
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#securityerror">"<code>SecurityError</code>"</dfn></li>
29612961
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#networkerror">"<code>NetworkError</code>"</dfn></li>
29622962
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#aborterror">"<code>AbortError</code>"</dfn></li>
2963-
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#quotaexceedederror">"<code>QuotaExceededError</code>"</dfn></li>
29642963
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#datacloneerror">"<code>DataCloneError</code>"</dfn></li>
29652964
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#encodingerror">"<code>EncodingError</code>"</dfn></li>
29662965
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#notallowederror">"<code>NotAllowedError</code>"</dfn></li>
@@ -113583,8 +113582,7 @@ document.querySelector("button").addEventListener("click", bound);
113583113582

113584113583
<li><p>If we've reached this point, <var>evaluationStatus</var> was left as null because the
113585113584
script was <span data-x="abort a running script">aborted prematurely</span> during evaluation.
113586-
Return <span>ThrowCompletion</span>(a new <span>"<code>QuotaExceededError</code>"</span>
113587-
<code>DOMException</code>).
113585+
Return <span>ThrowCompletion</span>(a new <code>QuotaExceededError</code>).
113588113586
</p></li>
113589113587
</ol>
113590113588

@@ -113625,7 +113623,7 @@ document.querySelector("button").addEventListener("click", bound);
113625113623
<p>If <span data-x="js-Evaluate">Evaluate</span> fails to complete as a result of the user agent
113626113624
<span data-x="abort a running script">aborting the running script</span>, then set
113627113625
<var>evaluationPromise</var> to <span>a promise rejected with</span> a new
113628-
<span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>.</p>
113626+
<code>QuotaExceededError</code>.</p>
113629113627
</li>
113630113628
</ol>
113631113629
</li>
@@ -113703,9 +113701,9 @@ document.querySelector("button").addEventListener("click", bound);
113703113701

113704113702
<p>User agents may impose resource limitations on scripts, for example CPU quotas, memory limits,
113705113703
total execution time limits, or bandwidth limitations. When a script exceeds a limit, the user
113706-
agent may either throw a <span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>,
113707-
<span data-x="abort a running script">abort the script</span> without an exception, prompt the
113708-
user, or throttle script execution.</p>
113704+
agent may either throw a <code>QuotaExceededError</code>, <span data-x="abort a running
113705+
script">abort the script</span> without an exception, prompt the user, or throttle script
113706+
execution.</p>
113709113707

113710113708
<div class="example">
113711113709

@@ -128126,9 +128124,9 @@ interface <dfn interface>Storage</dfn> {
128126128124
<p>Sets the value of the pair identified by <var>key</var> to <var>value</var>, creating a new
128127128125
key/value pair if none existed for <var>key</var> previously.</p>
128128128126

128129-
<p>Throws a <span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>
128130-
if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage
128131-
for the site, or if the quota has been exceeded.)</p>
128127+
<p>Throws a <code>QuotaExceededError</code> if the new value couldn't be set. (Setting could
128128+
fail if, e.g., the user has disabled storage for the site, or if the quota has been
128129+
exceeded.)</p>
128132128130

128133128131
<p>Dispatches a <code data-x="event-storage">storage</code> event on <code>Window</code> objects
128134128132
holding an equivalent <code>Storage</code> object.</p>
@@ -128282,7 +128280,7 @@ interface <dfn interface>Storage</dfn> {
128282128280
</li>
128283128281

128284128282
<li><p>If <var>value</var> cannot be stored, then throw a
128285-
<span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>.</p></li>
128283+
<code>QuotaExceededError</code>.</p></li>
128286128284

128287128285
<li><p><span data-x="map set">Set</span> <span>this</span>'s <span
128288128286
data-x="concept-Storage-map">map</span>[<var>key</var>] to <var>value</var>.</p></li>

0 commit comments

Comments
 (0)