mirror of
https://github.com/flynx/object.js.git
synced 2025-10-29 18:40:08 +00:00
tweaking docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b57759d40f
commit
6285851010
47
README.md
47
README.md
@ -380,28 +380,6 @@ C(<name>, ..)
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Limitations
|
|
||||||
|
|
||||||
### Can not mix unrelated native types directly
|
|
||||||
|
|
||||||
At this point we can't mix native types, i.e. it is not possible to make
|
|
||||||
a callable `Array`...
|
|
||||||
|
|
||||||
For example this will produce a broken instance:
|
|
||||||
```javascript
|
|
||||||
var CallablaArray = object.Constructor('CallablaArray', Array, function(){ .. })
|
|
||||||
```
|
|
||||||
|
|
||||||
This will produce a broken instance in a different way:
|
|
||||||
```javascript
|
|
||||||
var CallablaArray = object.Constructor('CallablaArray', Array, {
|
|
||||||
__call__: function(){ .. },
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
Some of this is due to how _object.js_ is currently implemented, this
|
|
||||||
needs further investigation...
|
|
||||||
|
|
||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
|
|
||||||
@ -416,6 +394,31 @@ This is used to format `.toString(..)` return values for nested functions
|
|||||||
to make source printing in console more pleasant to read.
|
to make source printing in console more pleasant to read.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
### Can not mix unrelated native types directly
|
||||||
|
|
||||||
|
At this point we can't mix native types, for example it is not possible
|
||||||
|
to make a callable `Array` object...
|
||||||
|
|
||||||
|
For example this will produce a broken instance:
|
||||||
|
```javascript
|
||||||
|
var CallablaArray = object.Constructor('CallablaArray', Array, function(){ .. })
|
||||||
|
```
|
||||||
|
|
||||||
|
This will produce an instance broken in a different way:
|
||||||
|
```javascript
|
||||||
|
var CallablaArray = object.Constructor('CallablaArray', Array, {
|
||||||
|
__call__: function(){ .. },
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
Some of this is due to how _object.js_ is currently implemented, this
|
||||||
|
needs further investigation...
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[BSD 3-Clause License](./LICENSE)
|
[BSD 3-Clause License](./LICENSE)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user