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

@ -397,14 +397,14 @@ pub(crate) unsafe fn call_html_constructor<T: DerivedFrom<Element> + DomObject>(
.is_ok()
}
pub(crate) unsafe fn call_default_constructor(
pub(crate) unsafe fn call_default_constructor<D: crate::DomTypes>(
cx: JSContext,
args: &CallArgs,
global: &GlobalScope,
global: &D::GlobalScope,
proto_id: PrototypeList::ID,
ctor_name: &str,
creator: unsafe fn(JSContext, HandleObject, *mut ProtoOrIfaceArray),
constructor: impl FnOnce(JSContext, &CallArgs, &GlobalScope, HandleObject) -> bool,
constructor: impl FnOnce(JSContext, &CallArgs, &D::GlobalScope, HandleObject) -> bool,
) -> bool {
if !args.is_constructing() {
throw_constructor_without_new(cx, ctor_name);