Skip to content

Commit

Permalink
It's JS code, not CSS (mdn#7140)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored Jul 21, 2021
1 parent 5bc3522 commit baed54a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/background_fetch_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 id="Examples">Examples</h2>

<p>A background fetch may fetch a number of files. In our example the fetch requests an MP3 and a JPEG. This enables a package of files that the user sees as one item (for example a podcast and artwork) to be downloaded at once.</p>

<pre class="brush:css">navigator.serviceWorker.ready.then(async (swReg) => {
<pre class="brush:js">navigator.serviceWorker.ready.then(async (swReg) => {
const bgFetch = await swReg.backgroundFetch.fetch('my-fetch', ['/ep-5.mp3', 'ep-5-artwork.jpg'], {
title: 'Episode 5: Interesting things.',
icons: [{
Expand Down

0 comments on commit baed54a

Please sign in to comment.