Answer the question
In order to leave comments, you need to log in
Mootools+node.js classes and inheritance
Good afternoon.
Faced this difficulty when using mootools and node.js together. There are two classes:
first
require('mootools');
module.exports = Class({
coreLink: null,
initialize: function (core) {
this.coreLink = core;
},
get: function (objName) {
if (null != this.coreLink.[objName]) {
return this.coreLink.[objName];
}
else {
return undefined;
}
}
});
var Class1= require('./Class1');
module.exports = Class({
Implements: [Class1],
initialize: function (core) {
this.coreLink = core;
},
start: function () {
// ...
this.get('name');
// ...
}
});
var Class2= require('./Class2');
var obj = new Class2({name: 'value'});
obj.start();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question