Closed seanzhou321 closed 9 years ago
Thank you for reporting. It'd be helpful if you could paste some samples?
var jf = require('jsface');
var Parent = jf.Class({ name: 'Parent' });
var Parent2mix = jf.Class({ mixMe: function() {console.log('mixme.');} });
var Child = jf.Class([Parent, Parent2mix], { childAction: function() { console.log('child Action.');} });
var aChild = new Child();
console.log('instanceof Parent?', aChild instanceof Parent); console.log('instanceof Parent2mix?', aChild instanceof Parent2mix);
The results returned are all false, which both should be true.
Hi, jsface is very nice given its speed and simplicity. I only found one issue that instanceof is broken for classes created by jsface. Besides of fixing instanceof, I have one wish to have instanceof also works for mixins, which acts as interfaces. Thanks.