OLD | NEW |
1 {{header}} | 1 {{header}} |
2 {{object 1 0}} << | 2 {{object 1 0}} << |
3 /Type /Catalog | 3 /Type /Catalog |
4 /Pages 2 0 R | 4 /Pages 2 0 R |
5 /AcroForm 6 0 R | 5 /AcroForm 6 0 R |
6 /Names <</JavaScript 13 0 R>> | 6 /Names <</JavaScript 13 0 R>> |
7 >> | 7 >> |
8 endobj | 8 endobj |
9 {{object 2 0}} << | 9 {{object 2 0}} << |
10 /Type /Pages | 10 /Type /Pages |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 >> | 66 >> |
67 stream | 67 stream |
68 function fireTimeOut() { | 68 function fireTimeOut() { |
69 app.alert("hello world"); | 69 app.alert("hello world"); |
70 } | 70 } |
71 function fireInterval() { | 71 function fireInterval() { |
72 app.alert("goodbye world"); | 72 app.alert("goodbye world"); |
73 } | 73 } |
74 var timer = app.setTimeOut("fireTimeOut()", 3000); | 74 var timer = app.setTimeOut("fireTimeOut()", 3000); |
75 var interval = app.setInterval("fireInterval()", 1000); | 75 var interval = app.setInterval("fireInterval()", 1000); |
| 76 // Clear timers before they fire. |
76 app.clearTimeOut(timer); | 77 app.clearTimeOut(timer); |
77 app.clearInterval(interval); | 78 app.clearInterval(interval); |
| 79 // Check that clearing a cleared timer is ok. |
| 80 app.clearTimeOut(timer); |
| 81 app.clearInterval(interval); |
| 82 // Check that invoking the wrong clear method is ok |
| 83 var timer = app.setTimeOut("fireTimeOut()", 3000); |
| 84 var interval = app.setInterval("fireInterval()", 1000); |
| 85 app.clearTimeOut(interval); |
| 86 app.clearInterval(timer); |
| 87 // Check that clearing a non-timer is ok. |
| 88 app.clearTimeOut({"size": 42}); |
| 89 app.clearInterval({"size": 42}); |
| 90 // Be sure all of this code ran to completion. |
| 91 app.alert("done"); |
78 endstream | 92 endstream |
79 endobj | 93 endobj |
80 {{xref}} | 94 {{xref}} |
81 trailer << | 95 trailer << |
82 /Root 1 0 R | 96 /Root 1 0 R |
83 >> | 97 >> |
84 {{startxref}} | 98 {{startxref}} |
85 %%EOF | 99 %%EOF |
OLD | NEW |