-
-
Notifications
You must be signed in to change notification settings - Fork 641
Dexie.override()
David Fahlander edited this page May 6, 2014
·
3 revisions
Enables overriding existing functions and still be able to call the original function from within your overridden function.
The following sample shows how to log to console each time window.open() is called.
window.open = Dexie.override(window.open, function(origFunc) {
return function (url) {
console.log("Opening url: " + url);
return origFunc.apply(this, arguments);
}
}
Dexie.js - minimalistic and bullet proof indexedDB library