summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/scroll-to-text-fragment/client-redirect.html
blob: 73858969e02e64e97f1cc50a84935eeeb9068dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<script>
  const query = window.location.search.substr(1);
  const type = query.split('&')[0];
  const url = decodeURIComponent(query.split('&')[1]);

  if (type == 'meta') {
    document.write(`<meta http-equiv="Refresh" content="0; URL=${url}">`);
  } else if (type == 'location') {
    window.location = url;
  }
</script>