Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce self.reportError() #1196

Merged
merged 1 commit into from
Jul 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -91040,6 +91040,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-reportError">reportError</code>( <var>e</var> )</dt>
<dd><p>Dispatches an <code data-x="event-error">error</code> event at the global object for the
given value <var>e</var>, in the same fashion as an unhandled exception.</p></dd>
</dl>

<p w-dev>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 @@ -91135,6 +91141,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-reportError"><code>reportError(<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 @@ -94075,6 +94085,8 @@ interface mixin <dfn interface>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-reportError">reportError</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