mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 02:50:10 +00:00
more docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c9186d6d04
commit
ddf98b5d7b
10
README.md
10
README.md
@ -130,8 +130,8 @@ the two contexts relevant to the callable instance:
|
|||||||
- Internal context (`this`)
|
- Internal context (`this`)
|
||||||
This always references the instance being called
|
This always references the instance being called
|
||||||
- External context (`context`)
|
- External context (`context`)
|
||||||
This is the object the instance is called from (`window` or `global` by
|
This is the object the instance is called from, i.e. the call _context_
|
||||||
default), i.e. _the thing before the dot_
|
(`window` or `global` by default)
|
||||||
|
|
||||||
If the prototype is explicitly defined as a function then it is the
|
If the prototype is explicitly defined as a function then it is the
|
||||||
user's responsibility to call .__call__(..) method.
|
user's responsibility to call .__call__(..) method.
|
||||||
@ -158,9 +158,9 @@ Contexts:
|
|||||||
- Internal context (`this`)
|
- Internal context (`this`)
|
||||||
References the `.prototype` of the constructor.
|
References the `.prototype` of the constructor.
|
||||||
- External context (`context`)
|
- External context (`context`)
|
||||||
This is the object the instance is called from (`window` or `global` by
|
This is the object the instance is called from, i.e. the call _context_
|
||||||
default), i.e. _the thing before the dot_, the same as for function
|
(`window` or `global` by default), the same as for function constructor
|
||||||
constructor and `.__call__(..)`.
|
and `.__call__(..)`.
|
||||||
|
|
||||||
|
|
||||||
The value `.__new__(..)`returns is used as the instance and gets linked
|
The value `.__new__(..)`returns is used as the instance and gets linked
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user