OLD | NEW |
1 %PDF-1.7 | 1 %PDF-1.7 |
2 % ò¤ô | 2 % ò¤ô |
3 1 0 obj << | 3 1 0 obj << |
4 /Type /Catalog | 4 /Type /Catalog |
5 /Pages 2 0 R | 5 /Pages 2 0 R |
6 /AcroForm 6 0 R | 6 /AcroForm 6 0 R |
7 /Names <</JavaScript 13 0 R>> | 7 /Names <</JavaScript 13 0 R>> |
8 >> | 8 >> |
9 endobj | 9 endobj |
10 2 0 obj << | 10 2 0 obj << |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 >> | 67 >> |
68 stream | 68 stream |
69 function fireTimeOut() { | 69 function fireTimeOut() { |
70 app.alert("hello world"); | 70 app.alert("hello world"); |
71 } | 71 } |
72 function fireInterval() { | 72 function fireInterval() { |
73 app.alert("goodbye world"); | 73 app.alert("goodbye world"); |
74 } | 74 } |
75 var timer = app.setTimeOut("fireTimeOut()", 3000); | 75 var timer = app.setTimeOut("fireTimeOut()", 3000); |
76 var interval = app.setInterval("fireInterval()", 1000); | 76 var interval = app.setInterval("fireInterval()", 1000); |
| 77 // Clear timers before they fire. |
77 app.clearTimeOut(timer); | 78 app.clearTimeOut(timer); |
78 app.clearInterval(interval); | 79 app.clearInterval(interval); |
| 80 // Check that clearing a cleared timer is ok. |
| 81 app.clearTimeOut(timer); |
| 82 app.clearInterval(interval); |
| 83 // Check that invoking the wrong clear method is ok |
| 84 var timer = app.setTimeOut("fireTimeOut()", 3000); |
| 85 var interval = app.setInterval("fireInterval()", 1000); |
| 86 app.clearTimeOut(interval); |
| 87 app.clearInterval(timer); |
| 88 // Check that clearing a non-timer is ok. |
| 89 app.clearTimeOut({"size": 42}); |
| 90 app.clearInterval({"size": 42}); |
| 91 // Be sure all of this code ran to completion. |
| 92 app.alert("done"); |
79 endstream | 93 endstream |
80 endobj | 94 endobj |
81 xref | 95 xref |
82 0 51 | 96 0 51 |
83 0000000000 65535 f | 97 0000000000 65535 f |
84 0000000015 00000 n | 98 0000000015 00000 n |
85 0000000118 00000 n | 99 0000000118 00000 n |
86 0000000000 65535 f | 100 0000000000 65535 f |
87 0000000181 00000 n | 101 0000000181 00000 n |
88 0000000000 65535 f | 102 0000000000 65535 f |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 0000000000 65535 f | 142 0000000000 65535 f |
129 0000000000 65535 f | 143 0000000000 65535 f |
130 0000000000 65535 f | 144 0000000000 65535 f |
131 0000000000 65535 f | 145 0000000000 65535 f |
132 0000000000 65535 f | 146 0000000000 65535 f |
133 0000000822 00000 n | 147 0000000822 00000 n |
134 trailer << | 148 trailer << |
135 /Root 1 0 R | 149 /Root 1 0 R |
136 >> | 150 >> |
137 startxref | 151 startxref |
138 1135 | 152 1655 |
139 %%EOF | 153 %%EOF |
OLD | NEW |