- From: Dirk Schulze <dschulze@adobe.com>
- Date: Fri, 27 Jun 2014 14:48:50 +0000
- To: Domenic Denicola <domenic@domenicdenicola.com>
- CC: Anne van Kesteren <annevk@annevk.nl>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Jun 27, 2014, at 3:39 PM, Domenic Denicola <domenic@domenicdenicola.com> wrote: >> My concern is that we expose functionality that might not be used by authors (creating a readonly object that even the creator can not modify). > > Why is the DOM creating a readonly object that even the DOM cannot modify? Or is the DOM somehow able to modify these objects? I notice that despite there being no setter for x, y, width, and height, the spec says things like > > "The x attribute, on setting, must set the x coordinate to the new value." > > Since you can't set a readonly attribute, this is just a bug in the spec as it stands. > > The question is whether the intention was to allow the DOM to modify the object, in which case they would do so via mutable internal slots that the x, y, width, and height public getters return the value of, or whether the intention was for these objects to be immutable after creation. (Again, for an excellent example of this, see WebCrypto, e.g. https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#cryptokey-interface-members where the getters are specified.) The DOM is indeed able to modify the readonly objects it might return. WebCrypto or ID guessing is definitely not part of a DOM implementations though. [NoInterface] objects and many other things of WebIDL can not exactly be represented with JS either, while this is absolutely possible with C++ and other programming languages. The DOM has/(is) a binding language to languages like JS. You might describe the behavior of the DOM as almighty. Maybe it is in JS terms. Greetings, Dirk
Received on Friday, 27 June 2014 14:49:23 UTC