diff --git a/website/guide/es6features.html b/website/guide/es6features.html index cd217a81..e5b1a6b3 100644 --- a/website/guide/es6features.html +++ b/website/guide/es6features.html @@ -1,23 +1,47 @@
This section describes the small set of features Duktape borrows from the -current ES6 draft. -These features are not fully compliant; the intent is to minimize custom features -and to align with the coming ES6 specification.
+current ES6 draft +("Version: Rev 23, April 5, 2014 Draft"). These features are not fully compliant; +the intent is to minimize custom features and to align with the coming ES6 specification.Object.setPrototypeOf
allows user to set the internal prototype of an object which is not supported in
Ecmascript E5. The Ecmascript E6 draft also provides
-Object.prototype.__proto__
-which is an accessor property (setter/getter) which provides the same functionality
+Object.prototype.__proto__,
+an accessor property (setter/getter) which provides the same functionality
but is compatible with existing code base which has relied on a non-standard
__proto__
property for a while. Duktape does not support the
__proto__ property name in an object initializer.
These custom features can be disabled with feature options.
+These custom features can be disabled with the feature options
+DUK_OPT_NO_OBJECT_ES6_SETPROTOTYPEOF
and
+DUK_OPT_NO_OBJECT_ES6_PROTO_PROPERTY
.
FIXME.
+The Ecmascript E6 Proxy
object allows property virtualization
+and fine-grained access control for accessing an underlying plain object.
+Duktape implements a strict subset of the Proxy
object from the
+ES6 draft (Rev 23).
Limitations include:
+get
, set
, deleteProperty
+ handler methods; ES6 draft allows a lot more, e.g. to interact with
+ properties being called or constructed, enumeration, etc. This causes
+ odd behavior if you enumerate a proxy object, call
+ Object.defineProperty()
with the proxy object as an argument,
+ etc.new Proxy()
cannot
+ be proxy objects themselves. ES6 poses no such limitation, but Duktape
+ enforces it to simplify the internal implementation.This custom feature can be disabled with the feature option
+DUK_OPT_NO_ES6_PROXY
.