-
Notifications
You must be signed in to change notification settings - Fork 17
Override base functions
Roberto Prevato edited this page May 2, 2017
·
1 revision
The KingTable library offers two ways to override base functions:
- when developing using the source ES6 code, use the built-in
extends
syntax andclass
definition - when instantiating a KingTable, pass a second parameter inside the constructor: it will be used to extend the instance
Example:
var table = new KingTable({
// options as first parameter
}, {
build: function () {} // overrides the base `build` function of the KingTable
});
This approach doesn't override the base definition of the KingTable
prototype.