script: Refer to DOM interfaces with generic types in generated bindings. (#35457)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-02-21 06:10:00 -05:00 committed by GitHub
parent 14db055d46
commit 1192ae32b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 627 additions and 167 deletions

View file

@ -1069,14 +1069,15 @@ pub(crate) fn handle_get_property(
property.handle_mut(),
)
} {
Ok(_) => match unsafe {
jsval_to_webdriver(*cx, &node.reflector().global(), property.handle())
} {
Ok(property) => property,
Err(_) => WebDriverJSValue::Undefined,
Ok(_) => {
match unsafe { jsval_to_webdriver(*cx, &node.global(), property.handle()) }
{
Ok(property) => property,
Err(_) => WebDriverJSValue::Undefined,
}
},
Err(error) => {
throw_dom_exception(cx, &node.reflector().global(), error);
throw_dom_exception(cx, &node.global(), error);
WebDriverJSValue::Undefined
},
}