mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 11:00:08 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0eb115aec8
commit
bbe9f37ae5
@ -360,9 +360,9 @@ 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,
|
constructor_attr: 123,
|
||||||
|
|
||||||
constructorMethod: function(){
|
constructorMethod: function(){
|
||||||
@ -370,7 +370,7 @@ var C = object.Constructor('C',
|
|||||||
},
|
},
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
}, {
|
}, {
|
||||||
instanceMethod: function(){
|
instanceMethod: function(){
|
||||||
// get constructor data...
|
// get constructor data...
|
||||||
var x = this.constructor.constructor_attr
|
var x = this.constructor.constructor_attr
|
||||||
@ -378,7 +378,7 @@ var C = object.Constructor('C',
|
|||||||
// ...
|
// ...
|
||||||
},
|
},
|
||||||
// ...
|
// ...
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
And the same thing while extending...
|
And the same thing while extending...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user