Closed PompolutZ closed 8 years ago
extend
is not exposed to global scope like Class. Could you try?
var extend = jsface.extend;
var Student = Class(Person, {
constructor: function(id, name, age) {
});
extend(Student, [ Options, Events ]);
Yes, sorry I've been sloppy not to see it on my own. I've noticed that after I've posted this issue. On the other hand, why not to expose extend by default, especially if it is mentioned in tutorials?
But thanks for respond.
Hi PompolutZ, JSFace introduces two namespaces jsface
and Class
to global context to minimize global namespace pollution. The other reason is to eliminate conflict with other libraries or frameworks (think if you have two libs in which both introduce extend
to global context).
I get this error when I try this example:
var Student = Class(Person, { constructor: function(id, name, age) { });
extend(Student, [ Options, Events ]);
I've tried both referencing jsface and include it in the script