[heycam/webidl] How to do aliases of legacy interfaces (HTMLDocument, WebKitCSSMatrix...) (#362)

So we have this in HTML:

> For historical reasons, Window objects must also have a writable, configurable, non-enumerable property named HTMLDocument whose value is the Document interface object.

https://html.spec.whatwg.org/#htmldocument

The intent here is to expose it in the same way as an actual interface is exposed per WebIDL rules.

This method of aliasing legacy interfaces is also used in the Geometry interfaces spec.

> For historical reasons, Window objects must also have writable, configurable, non-enumerable properties named SVGMatrix and WebKitCSSMatrix whose value is the DOMMatrix interface object.

https://drafts.fxtf.org/geometry/#webkitcssmatrix

In implementing this it appears tempting to try to do so via an IDL attribute on `Window`, but that does not have correct behavior (it will have a getter instead of value, it's enumerable, etc). c.f. https://codereview.chromium.org/2709763004/#msg53

Should we add dedicated IDL syntax for this?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/362

Received on Friday, 12 May 2017 11:49:30 UTC