mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 14:46:02 +00:00
Allow a closure as an event handler. Not part of the build.
This commit is contained in:
parent
43a8cdaf19
commit
065d0c32f1
@ -92,7 +92,8 @@ class EventListener:
|
||||
# Although handler is already a function object, we must re-bind to
|
||||
# new globals
|
||||
if self.globals is not None:
|
||||
f = new.function(self.func.func_code, self.globals, self.func.func_name)
|
||||
f = new.function(self.func.func_code, self.globals,
|
||||
self.func.func_name, self.func.func_closure)
|
||||
else:
|
||||
f = self.func
|
||||
# Convert the raw pyxpcom object to a magic _nsdom one, that
|
||||
|
Loading…
x
Reference in New Issue
Block a user