summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/jsapi/functions/resources/relevant/relevant.html
blob: 06df91c23741f517fd6a88662f5866cd51531221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<meta charset="utf-8">
<title>Relevant page used as a test helper</title>

<script>
// incumbent.html will end up posting a message to here. We need to signal back the "source".

window.onmessage = e => {
  const testId = e.data;
  const sourceURL = e.source.document.URL;

  window.dispatchEvent(new CustomEvent("messagereceived", { detail: [testId, sourceURL] }));
};
</script>