Hi
(haraken) I was in Munich to discuss a bunch of stuff with the V8 team.
(0) Motivation for this work: Correctness & inter-operability. We've migrated 99% of the DOM attributes to accessor-type properties (i.e., exposed JS getters/setters for the DOM attributes). The remaining DOM attributes are the ones on Window objects. We cannot migrate the Window's DOM attributes to accessor-type properties without fixing the following issues.
(1) we need to find correct home for DOM attributes/operations of a Window object (and other [Global] objects).
(2) We need to implement the following things in V8:
- A way to list up only whitelisted members when Object.getOwnPropertyNames(crossOriginWindow) gets called.
- A way to let the binding layer hook the access to a getter/setter of an accessor-type property. For example, in order to return a cross-origin-safe function for Object.getOwnPropertyDescriptor(crossOriginWindow, "self").get, the binding layer needs to be able to hook the getter and return a cross-origin-safe function properly.
(3) Once the above two issues are resolved, we can migrate Window's attributes to accessor-type properties. Then the "moving-DOM-attribute-to-prototype-chain" project will finish.
(haraken) Moved [Unforgeable] DOM attributes/operations from the inner global object to the Window wrapper.
(haraken) Noticed that we cannot move the values of [Replaceable] attributes to the Window wrapper without fixing (2) in the above.
(yukishiino) Supported inheritance of [Unforgeable] DOM attributes as accessor-type properties. This will be used by Event.isTrusted.
(yukishiino) Moved [OverrideBuiltin] DOM attributes to prototype chains.
(haraken) Landed a couple of CLs to simplify the handling of Window attributes.