- From: Adam Barth <w3c@adambarth.com>
- Date: Thu, 16 Jul 2009 10:45:55 -0700
- To: public-webapps <public-webapps@w3.org>
- Cc: Maciej Stachowiak <mjs@apple.com>
When a browser creates an instance of a DOM object defined by an WebIDL interface, the browser must choose where to connect it's prototype chain. For example, consider this case (where frames[0] is a same-origin child frame): var doc = frames[0].document; 1) To which global object's prototypes ought |doc| connect to, the parent frame running the script or the child frame from which we obtained the document? 2) Where is this behavior specified? If the behavior is currently not specified, which spec ought to contain the requirements? My best guess is that the prototype chain ought to connect to the child's prototype (because the document "is owned by" the child frame) and that the WebIDL spec ought to include this requirement (because WebIDL explains how to reify abstract DOM interfaces in ECMAScript). Thoughts? Adam
Received on Thursday, 16 July 2009 17:46:55 UTC