Skip to content

Commit

Permalink
Introduce 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 0dae6cc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 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>e</var> )</dt>
<dd><p>Dispatches an <code data-x="event-error">error</code> event at the global object for the
given exception <var>e</var>, 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>e</var>)</code></dfn> method steps are to
<span>report the exception</span> <var>e</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,8 @@ 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>;

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

// 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 0dae6cc

Please sign in to comment.