4 <meta charset=
"utf-8" />
5 <title>Callback Function Objects Implementing handleEvent()
</title>
10 When a JS callback is a function, it should be called. If the function has another function as
11 its
<code>handleEvent
</code> property, that function should
<em>not
</em> be called.
16 <script src=
"../../resources/js-test.js"></script>
17 <script type=
"text/javascript" charset=
"utf-8">
18 window.jsTestIsAsync = true;
20 // This function should be called.
21 var callback = function(event) {
22 testPassed(
"The callback function was called directly.");
25 // This function should not be called.
26 callback.handleEvent = function(event) {
27 testFailed(
"The callback function's handleEvent property was called instead of the function itself.");
31 // Database is one of several uses of JS Callbacks
32 var db = openDatabase(
"callback-function-with-handle-event-test",
"",
"Test for callback functions that implement a handleEvent() method.",
1);
33 db.changeVersion(db.version,
"1.0", callback);