Skip to content

Commit 99e1b35

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 8cf9da4 commit 99e1b35

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
@@ -305,6 +305,14 @@ impl<'a> ToIdlType<'a> for Identifier<'a> {
305305
name: self.0,
306306
single_function: data.single_function,
307307
})
308+
} else if self.0 == "WindowProxy" {
309+
// See this for more info:
310+
//
311+
// https://html.spec.whatwg.org/multipage/window-object.html#windowproxy
312+
//
313+
// namely this seems to be "legalese" for "this is a `Window`", so
314+
// let's translate it as such.
315+
Some(IdlType::Interface("Window"))
308316
} else {
309317
warn!("Unrecognized type: {}", self.0);
310318
None

0 commit comments

Comments
 (0)