Skip to content

Commit a78ab4b

Browse files
committed
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.
1 parent a1f3c52 commit a78ab4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/webidl/src/idl_type.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ impl<'a> ToIdlType<'a> for Identifier<'a> {
302302
name: self.0,
303303
single_function: data.single_function,
304304
})
305+
} else if self.0 == "WindowProxy" {
306+
// See this for more info:
307+
//
308+
// https://html.spec.whatwg.org/multipage/window-object.html#windowproxy
309+
//
310+
// namely this seems to be "legalese" for "this is a `Window`", so
311+
// let's translate it as such.
312+
Some(IdlType::Interface("Window"))
305313
} else {
306314
warn!("Unrecognized type: {}", self.0);
307315
None

0 commit comments

Comments
 (0)