def FixEventTargets(self, database): for interface in database.GetInterfaces(): # Create fake EventTarget parent interface for interfaces that have # 'EventTarget' extended attribute. if 'EventTarget' in interface.ext_attrs: ast = [('Annotation', [('Id', 'WebKit')]), ('InterfaceType', ('ScopedName', 'EventTarget'))] interface.parents.append(idlnode.IDLParentInterface(ast))
def FixEventTargets(self, database): for interface in database.GetInterfaces(): if self.IsEventTarget(database, interface): # Add as an attribute for easy querying in generation code. interface.ext_attrs['EventTarget'] = None elif 'EventTarget' in interface.ext_attrs: # Create fake EventTarget parent interface for interfaces that have # 'EventTarget' extended attribute. ast = [('Annotation', [('Id', 'WebKit')]), ('InterfaceType', ('ScopedName', 'EventTarget'))] interface.parents.append(idlnode.IDLParentInterface(ast))