1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12

content / test / data / service_worker / fetch_from_page.html [blame]

<!doctype html>
<title>Fetch url specified by a query param</title>
<script>
async function fetch_from_page(url) {
  try {
    const response = await fetch(url);
    return await response.text();
  } catch (error) {
    return `${error}`;
  }
}
</script>