Translate the WindowProxy type to Window.

This is roughly defined by
https://html.spec.whatwg.org/multipage/window-object.html#windowproxy and
otherwise fits the bill how otherwise only `interface WindowProxy;` exists in
the WebIDL.
This commit is contained in:
Alex Crichton 2018-09-17 14:14:49 -07:00
parent 8cf9da4981
commit 99e1b352e5

View File

@ -305,6 +305,14 @@ impl<'a> ToIdlType<'a> for Identifier<'a> {
name: self.0,
single_function: data.single_function,
})
} else if self.0 == "WindowProxy" {
// See this for more info:
//
// https://html.spec.whatwg.org/multipage/window-object.html#windowproxy
//
// namely this seems to be "legalese" for "this is a `Window`", so
// let's translate it as such.
Some(IdlType::Interface("Window"))
} else {
warn!("Unrecognized type: {}", self.0);
None