19 lines
381 B
JavaScript
19 lines
381 B
JavaScript
var Test = function(Foo) {
|
|
function Test() {
|
|
Foo.prototype.test;
|
|
Foo.prototype.test.whatever;
|
|
}
|
|
|
|
Test.prototype = Object.create(Foo.prototype, {
|
|
constructor: {
|
|
value: Test,
|
|
enumerable: false,
|
|
writable: true,
|
|
configurable: true
|
|
}
|
|
});
|
|
|
|
Test.__proto__ = Foo;
|
|
return Test;
|
|
}(Foo);
|