Allow a closure as an event handler. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@213165 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user