Skip to content

Commit 1bc7233

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 8035a25 commit 1bc7233

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
@@ -2902,8 +2902,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29022902
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#dfn-set-entries">set entries</dfn></li>
29032903
</ul>
29042904

2905-
<p><cite>Web IDL</cite> also defines the following types that are used in Web IDL fragments in
2906-
this specification:</p>
2905+
<p><cite>Web IDL</cite> also defines the following types that are used in this specification:</p>
29072906

29082907
<ul class="brief">
29092908
<li><dfn data-x="idl-ArrayBuffer" data-x-href="https://webidl.spec.whatwg.org/#idl-ArrayBuffer"><code>ArrayBuffer</code></dfn></li>
@@ -2922,6 +2921,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29222921
<li><dfn data-x="idl-unsigned-long" data-x-href="https://webidl.spec.whatwg.org/#idl-unsigned-long"><code>unsigned long</code></dfn></li>
29232922
<li><dfn data-x="idl-USVString" data-x-href="https://webidl.spec.whatwg.org/#idl-USVString"><code>USVString</code></dfn></li>
29242923
<li><dfn data-x="idl-VoidFunction" data-x-href="https://webidl.spec.whatwg.org/#VoidFunction"><code>VoidFunction</code></dfn></li>
2924+
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#quotaexceedederror"><code>QuotaExceededError</code></dfn></li>
29252925
</ul>
29262926

29272927
<p>The term <dfn data-x-href="https://webidl.spec.whatwg.org/#dfn-throw">throw</dfn> in this
@@ -2943,7 +2943,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
29432943
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#securityerror">"<code>SecurityError</code>"</dfn></li>
29442944
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#networkerror">"<code>NetworkError</code>"</dfn></li>
29452945
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#aborterror">"<code>AbortError</code>"</dfn></li>
2946-
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#quotaexceedederror">"<code>QuotaExceededError</code>"</dfn></li>
29472946
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#datacloneerror">"<code>DataCloneError</code>"</dfn></li>
29482947
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#encodingerror">"<code>EncodingError</code>"</dfn></li>
29492948
<li><dfn data-x-href="https://webidl.spec.whatwg.org/#notallowederror">"<code>NotAllowedError</code>"</dfn></li>
@@ -110528,8 +110527,7 @@ document.querySelector("button").addEventListener("click", bound);
110528110527

110529110528
<li><p>If we've reached this point, <var>evaluationStatus</var> was left as null because the
110530110529
script was <span data-x="abort a running script">aborted prematurely</span> during evaluation.
110531-
Return <span>ThrowCompletion</span>(a new <span>"<code>QuotaExceededError</code>"</span>
110532-
<code>DOMException</code>).
110530+
Return <span>ThrowCompletion</span>(a new <code>QuotaExceededError</code>).
110533110531
</p></li>
110534110532
</ol>
110535110533

@@ -110570,7 +110568,7 @@ document.querySelector("button").addEventListener("click", bound);
110570110568
<p>If <span data-x="js-Evaluate">Evaluate</span> fails to complete as a result of the user agent
110571110569
<span data-x="abort a running script">aborting the running script</span>, then set
110572110570
<var>evaluationPromise</var> to <span>a promise rejected with</span> a new
110573-
<span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>.</p>
110571+
<code>QuotaExceededError</code>.</p>
110574110572
</li>
110575110573
</ol>
110576110574
</li>
@@ -110648,9 +110646,9 @@ document.querySelector("button").addEventListener("click", bound);
110648110646

110649110647
<p>User agents may impose resource limitations on scripts, for example CPU quotas, memory limits,
110650110648
total execution time limits, or bandwidth limitations. When a script exceeds a limit, the user
110651-
agent may either throw a <span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>,
110652-
<span data-x="abort a running script">abort the script</span> without an exception, prompt the
110653-
user, or throttle script execution.</p>
110649+
agent may either throw a <code>QuotaExceededError</code>, <span data-x="abort a running
110650+
script">abort the script</span> without an exception, prompt the user, or throttle script
110651+
execution.</p>
110654110652

110655110653
<div class="example">
110656110654

@@ -124791,9 +124789,9 @@ interface <dfn interface>Storage</dfn> {
124791124789
<p>Sets the value of the pair identified by <var>key</var> to <var>value</var>, creating a new
124792124790
key/value pair if none existed for <var>key</var> previously.</p>
124793124791

124794-
<p>Throws a <span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>
124795-
if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage
124796-
for the site, or if the quota has been exceeded.)</p>
124792+
<p>Throws a <code>QuotaExceededError</code> if the new value couldn't be set. (Setting could
124793+
fail if, e.g., the user has disabled storage for the site, or if the quota has been
124794+
exceeded.)</p>
124797124795

124798124796
<p>Dispatches a <code data-x="event-storage">storage</code> event on <code>Window</code> objects
124799124797
holding an equivalent <code>Storage</code> object.</p>
@@ -124947,7 +124945,7 @@ interface <dfn interface>Storage</dfn> {
124947124945
</li>
124948124946

124949124947
<li><p>If <var>value</var> cannot be stored, then throw a
124950-
<span>"<code>QuotaExceededError</code>"</span> <code>DOMException</code>.</p></li>
124948+
<code>QuotaExceededError</code>.</p></li>
124951124949

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

0 commit comments

Comments
 (0)