Make generated bindings generic over DOM types (#35169)

* bindings: Start making generated bindings methods generic over DOM trait.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* bindings: Make binding initialization generic over the DOM types trait.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* bindings: Start making proxyhandler code generic over DOM types.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-01-25 00:08:49 -05:00 committed by GitHub
parent 8748071329
commit d5d7b0d34f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 72 additions and 52 deletions

View file

@ -69,8 +69,8 @@ pub fn init() -> JSEngineSetup {
// Create the global vtables used by the (generated) DOM
// bindings to implement JS proxies.
RegisterBindings::RegisterProxyHandlers();
RegisterBindings::InitAllStatics();
RegisterBindings::RegisterProxyHandlers::<crate::DomTypeHolder>();
RegisterBindings::InitAllStatics::<crate::DomTypeHolder>();
js::glue::InitializeMemoryReporter(Some(is_dom_object));
}