From 4e5ad63746a7fc3c6ff451b385add1acbc7f0471 Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Thu, 5 Oct 2006 10:53:32 +0000 Subject: [PATCH] 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 --- mozilla/extensions/python/dom/nsdom/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/extensions/python/dom/nsdom/context.py b/mozilla/extensions/python/dom/nsdom/context.py index b75b2de470d..975c93d30e4 100644 --- a/mozilla/extensions/python/dom/nsdom/context.py +++ b/mozilla/extensions/python/dom/nsdom/context.py @@ -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