Skip to content

Commit

Permalink
Update note on OffscreenCanvas being an event target
Browse files Browse the repository at this point in the history
Part of whatwg#7130.
  • Loading branch information
yiyix authored and dandclark committed Dec 4, 2021
1 parent 302559e commit 5bb6fbc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -66769,9 +66769,13 @@ interface <dfn interface>OffscreenCanvas</dfn> : <span>EventTarget</span> {
attribute <span>EventHandler</span> <span data-x="handler-offscreencanvas-oncontextrestored">oncontextrestored</span>;
};</code></pre>

<p class="note"><code>OffscreenCanvas</code> is an <code>EventTarget</code> so that WebGL can
fire <code data-x="">webglcontextlost</code> and <code data-x="">webglcontextrestored</code>
events at it. <ref spec=WEBGL></p>
<p class="note"><code>OffscreenCanvas</code> is an <code>EventTarget</code>, so both
<code>OffscreenCanvasRenderingContext2D</code> and WebGL can fire events at it.
<code>OffscreenCanvasRenderingContext2D</code> can fire <code
data-x="event-contextlost">contextlost</code> and <code
data-x="event-contextrestored">contextrestored</code>, and WebGL can fire <code
data-x="">webglcontextlost</code> and <code data-x="">webglcontextrestored</code>. <ref
spec=WEBGL></p>

<p><code>OffscreenCanvas</code> objects are used to create rendering contexts, much like an
<code>HTMLCanvasElement</code>, but with no connection to the DOM. This makes it possible to
Expand Down

0 comments on commit 5bb6fbc

Please sign in to comment.