mirror of
https://github.com/servo/servo.git
synced 2025-06-13 02:44:29 +00:00
Support arbitrary protos when wrapping DOM objects with constructors.
This commit is contained in:
parent
d9600ff50f
commit
dbff26bce0
197 changed files with 2028 additions and 586 deletions
|
@ -6147,9 +6147,7 @@ let global = DomRoot::downcast::<dom::types::%s>(global).unwrap();
|
|||
else:
|
||||
name = self.constructor.identifier.name
|
||||
nativeName = MakeNativeName(self.descriptor.binaryNameFor(name))
|
||||
args = ["&global"]
|
||||
if self.descriptor.interface.identifier.name == "EventTarget":
|
||||
args += ["desired_proto.handle()"]
|
||||
args = ["&global", "Some(desired_proto.handle())"]
|
||||
constructorCall = CGMethodCall(args, nativeName, True,
|
||||
self.descriptor, self.constructor)
|
||||
return CGList([preamble, constructorCall])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue