Skip to content

Commit 921d4cd

Browse files
committed
chore: add note about compatibility
1 parent 482f89f commit 921d4cd

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

web-workers/offscreen-canvas-worker/index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
<body>
1111
<header>
1212
<h1>OffscreenCanvas and worker threads</h1>
13+
<p>
14+
<b>Note:</b> your browser must support
15+
<a
16+
href="https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas"
17+
><code>OffscreenCanvas</code></a
18+
>.
19+
</p>
1320
<p>This example has two canvases with incrementing counters.</p>
1421

1522
<p>
@@ -55,15 +62,15 @@ <h1>OffscreenCanvas and worker threads</h1>
5562
</div>
5663
<div id="canvas-description">
5764
<p>
58-
<b>When the main thread is blocked</b>, all UI elements are frozen.
59-
The hover effect on buttons is affected like this one:
65+
<b>When the main thread is blocked</b>, all UI elements are frozen.<br />
66+
The hover effect on buttons is also blocked:
6067
</p>
6168
<button>Example button</button>
6269
<p>
6370
<b>When the worker thread is blocked</b>, the main thread is free to
6471
do work such as the element hover effects and animations. Blocking the
6572
worker thread will still prevent Canvas B's counter from being
66-
updated, but the UI stays responsive while this happens.
73+
updated, but the rest of the UI stays responsive while this is true.
6774
</p>
6875
</div>
6976

web-workers/offscreen-canvas-worker/style.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ canvas:hover {
5252

5353
#canvas-description {
5454
max-width: 50%;
55-
text-align: center;
56-
}
57-
58-
#canvas-description>p {
5955
text-align: left;
6056
}
6157

0 commit comments

Comments
 (0)