summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/new-console-output/test/mochitest/test-batching.html
blob: 9d122387a2fbbcfe96f8fdc40abb69d8e1e0c665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Webconsole batch console calls test page</title>
  </head>
  <body>
    <p>batch console calls test page</p>
    <script>
    "use strict";

    function batchLog(numMessages = 0) {
      for (let i = 0; i < numMessages; i++) {
        console.log(i);
      }
    }

    function batchLogAndClear(numMessages = 0) {
      for (let i = 0; i < numMessages; i++) {
        console.log(i);
        if (i === numMessages - 1) {
          console.clear();
        }
      }
    }
    </script>
  </body>
</html>