devtools/client/webreplay/mochitest/examples/doc_rr_basic.html
author Brian Hackett <bhackett1024@gmail.com>
Sun, 12 May 2019 13:09:55 -1000
changeset 474171 6cd72bb81d8952d3b2ea8c8cd7cdcc9618d8e290
parent 454208 a441a085b516820f5e75c8d788a5a4dd5a6c4684
permissions -rw-r--r--
Bug 1547084 Part 1 - Remove recordReplayDirective interface and uses, r=mccr8.

<html lang="en" dir="ltr">
<body>
<div id="maindiv" style="padding-top:50px">Hello World!</div>
</body>
<script>
const cpmm = SpecialPowers.Services.cpmm;
function recordingFinished() {
  cpmm.sendAsyncMessage("RecordingFinished");
}
var number = 0;
function f() {
  updateNumber();
  if (number >= 10) {
    window.setTimeout(recordingFinished);
    return;
  }
  window.setTimeout(f, 1);
}
function updateNumber() {
  number++;
  document.getElementById("maindiv").innerHTML = "Number: " + number;
  testStepping();
}
function testStepping() {
  var a = 0;
  testStepping2();
  return a;
}
function testStepping2() {
  var c = this; // Note: using 'this' causes the script to have a prologue.
  c++;
  c--;
}
window.setTimeout(f, 1);
</script>
</html>