Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class BaseClass {
- constructor(cfg) {
- // Transfer all properties to class object
- Object.assign(this, cfg);
- if(this.el instanceof HTMLElement === false) {
- return;
- }
- this.setup();
- }
- setup() {
- this.isSetup = true;
- }
- class MyClass extends BaseClass {
- setup() {
- // Calling super
- super.setup();
- this.show(); **// this.show is not a function**
- }
- show = () => {
- console.log('called');
- }
- }
Add Comment
Please, Sign In to add comment