Skip to content

Commit

Permalink
Introducing self.reportException()
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jun 4, 2021
1 parent 0e2bdcf commit 755c57a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -90804,6 +90804,12 @@ document.querySelector("button").addEventListener("click", bound);

<h5 id="runtime-script-errors">Runtime script errors</h5>

<dl class="domintro">
<dt>self . <code subdfn data-x="dom-reportException">reportException</code>( <var>exception</var> )</dt>
<dd><p>Dispatches an <code data-x="event-error">error</code> event at the global object, in the
same fashion as an unhandled exception.</p></dd>
</dl>

<p w-nohtml>In various scenarios, the user agent can report an exception by firing an <code
data-x="event-error">error</code> event at the <code>Window</code>. If this event is not canceled,
then the error is considered not handled, and can be reported to the developer console.</p>
Expand Down Expand Up @@ -90899,6 +90905,10 @@ document.querySelector("button").addEventListener("click", bound);
have known problems. You can track future cleanup in this area in <a
href="https://github.com/whatwg/html/issues/958">issue #958</a>.</p>

<p>The <dfn method for="WindowOrWorkerGlobalScope"
data-x="dom-reportException"><code>reportException(<var>exception</var>)</code></dfn> method steps
are to <span>report the exception</span> <var>exception</var>.</p>

<p id="the-errorevent-interface">The <code>ErrorEvent</code> interface is defined as follows:</p>

<pre><code class="idl">[Exposed=(Window,Worker)]
Expand Down Expand Up @@ -93839,6 +93849,9 @@ interface mixin <dfn>WindowOrWorkerGlobalScope</dfn> {
readonly attribute boolean <span data-x="dom-isSecureContext">isSecureContext</span>;
readonly attribute boolean <span data-x="dom-crossOriginIsolated">crossOriginIsolated</span>;

// report an exception
undefined <span data-x="dom-reportException">reportException</span>(any exception);

// base64 utility methods
DOMString <span data-x="dom-btoa">btoa</span>(DOMString data);
ByteString <span data-x="dom-atob">atob</span>(DOMString data);
Expand Down

0 comments on commit 755c57a

Please sign in to comment.