[Pkg-javascript-commits] [node-expat] 167/371: Parser(): simplify	parser.emit() proxying
    Jonas Smedegaard 
    dr at jones.dk
       
    Sun Feb 28 09:59:58 UTC 2016
    
    
  
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-expat.
commit 2e116302cd327d51a85e457dea342de684fc4442
Author: Astro <astro at spaceboyz.net>
Date:   Fri Jun 22 03:32:43 2012 +0200
    Parser(): simplify parser.emit() proxying
---
 lib/node-expat.js | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/lib/node-expat.js b/lib/node-expat.js
index 86ab310..b78aaa8 100644
--- a/lib/node-expat.js
+++ b/lib/node-expat.js
@@ -5,12 +5,8 @@ var expat = require('../build/Release/node_expat.node');
 var Stream = require('stream').Stream;
 
 var Parser = function(encoding) {
-  var that = this;
-
   this.parser = new expat.Parser(encoding);
-  this.parser.emit = function() {
-    that.emit.apply(that, arguments);
-  };
+  this.parser.emit = this.emit.bind(this);
 
   //stream API
   this.writable = true;
-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-expat.git
    
    
More information about the Pkg-javascript-commits
mailing list