summaryrefslogtreecommitdiffstats
path: root/toolkit/components/contentanalysis/tests/browser/changing_page_for_print.html
blob: de6f9001aa82dc35709511a0de3104d91bf3cae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<p>Some random text</p>
<button onclick="print()">Print the page</button>
<pre id="log"></pre>
<script>
let i = 0;
for (let t of ["beforeprint", "afterprint"]) {
  addEventListener(t, () => {
    document.getElementById("log").appendChild(document.createTextNode(`[${i++}] ${t}\n`));
  });
}
</script>