@@ -1462,7 +1462,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1462
1462
* the name of the database, the name of the table, and the row id of the
1463
1463
* changed row.
1464
1464
* - Set to `null` to unregister.
1465
- * @returns {void }
1465
+ * @returns {Database } The database object. Useful for method chaining
1466
1466
*/
1467
1467
Database . prototype [ "updateHook" ] = function updateHook ( callback ) {
1468
1468
if ( this . updateHookFunctionPtr ) {
@@ -1474,7 +1474,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1474
1474
1475
1475
if ( ! callback ) {
1476
1476
// no new callback to register
1477
- return ;
1477
+ return this ;
1478
1478
}
1479
1479
1480
1480
// void(*)(void *,int ,char const *,char const *,sqlite3_int64)
@@ -1521,6 +1521,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1521
1521
this . updateHookFunctionPtr ,
1522
1522
0 // passed as the first arg to wrappedCallback
1523
1523
) ;
1524
+ return this ;
1524
1525
} ;
1525
1526
1526
1527
/**
0 commit comments