OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8" /> | 4 <meta charset="utf-8" /> |
5 <title>Callback Function Objects Implementing handleEvent()</title> | 5 <title>Callback Function Objects Implementing handleEvent()</title> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 | 8 |
9 <p> | 9 <p> |
10 When a JS callback is a function, it should be called. If the function has
another function as | 10 When a JS callback is a function, it should be called. If the function has
another function as |
(...skipping 14 matching lines...) Expand all Loading... |
25 // This function should not be called. | 25 // This function should not be called. |
26 callback.handleEvent = function(event) { | 26 callback.handleEvent = function(event) { |
27 testFailed("The callback function's handleEvent property was called inst
ead of the function itself."); | 27 testFailed("The callback function's handleEvent property was called inst
ead of the function itself."); |
28 finishJSTest(); | 28 finishJSTest(); |
29 }; | 29 }; |
30 | 30 |
31 // Database is one of several uses of JS Callbacks | 31 // Database is one of several uses of JS Callbacks |
32 var db = openDatabase("callback-function-with-handle-event-test", "", "Tes
t for callback functions that implement a handleEvent() method.", 1); | 32 var db = openDatabase("callback-function-with-handle-event-test", "", "Tes
t for callback functions that implement a handleEvent() method.", 1); |
33 db.changeVersion(db.version, "1.0", callback); | 33 db.changeVersion(db.version, "1.0", callback); |
34 </script> | 34 </script> |
35 <script src="resources/js-test-post.js"></script> | |
36 | 35 |
37 </body> | 36 </body> |
38 </html> | 37 </html> |
OLD | NEW |