Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-05-08 04:17:03 +03:00
parent 0eb115aec8
commit bbe9f37ae5

View File

@ -360,25 +360,25 @@ handling.
### Extending the constructor ### Extending the constructor
```javascript ```javascript
var C = object.Constructor('C', var C = object.Constructor('C', {
// this will get mixed into the constructor C... // this will get mixed into the constructor C...
{
constructor_attr: 123,
constructorMethod: function(){ constructor_attr: 123,
// ...
}, constructorMethod: function(){
// ...
},
// ...
}, {
instanceMethod: function(){
// get constructor data...
var x = this.constructor.constructor_attr
// ... // ...
}, { },
instanceMethod: function(){ // ...
// get constructor data... })
var x = this.constructor.constructor_attr
// ...
},
// ...
})
``` ```
And the same thing while extending... And the same thing while extending...