mirror of
https://github.com/flynx/object.js.git
synced 2025-10-29 18:40:08 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0eb115aec8
commit
bbe9f37ae5
30
README.md
30
README.md
@ -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...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user