Exposing constructors of readonly interfaces to web authors


We had a longer discussion about readonly interfaces before[1]. We discussed why we use them and how they could be exposed.

I am bringing up a concern from Domenic[2] that the readonly interfaces DOMPointReadOnly, DOMRectReadOnly, DOMMatrixReadOnly[3] do not have constructors today. Domenic says that it is not acceptable from a technical architecture point of view for the web platform because it is not explicable through JavaScript semantics. Also, if the web platform needs readonly interfaces, then they will be useful for authors as well.

I donít think that all interfaces need to be createable by JavaScript. After all, we are talking about a DOM representation. 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). Beside, if a functionality is requested by web authors, we can always add it to the web platform later. Removing a functionality is much harder. (Even though I donít think that we are actually removing the interfaces.)

The question is probably which argument outweighs the other?


[1] http://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0010.html
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26201
[3] http://dev.w3.org/fxtf/geometry/#DOMRect

Received on Friday, 27 June 2014 07:20:12 UTC