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

@ -245,6 +245,7 @@ class Descriptor(DescriptorProvider):
self.path = desc.get('path', pathDefault)
self.inRealmMethods = [name for name in desc.get('inRealms', [])]
self.canGcMethods = [name for name in desc.get('canGc', [])]
self.additionalTraits = [name for name in desc.get('additionalTraits', [])]
self.bindingPath = f"{getModuleFromObject(self.interface)}::{ifaceName}_Binding"
self.outerObjectHook = desc.get('outerObjectHook', 'None')
self.proxy = False