[Pkg-javascript-commits] [ltx] 234/469: browser_benchmark: fix for browserify usage
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:03:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit 248b70d8562f79ec29a9ef2e36bc627b62786060
Author: Astro <astro at spaceboyz.net>
Date: Tue Mar 20 23:29:42 2012 +0100
browser_benchmark: fix for browserify usage
---
benchmark/browser_benchmark.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/benchmark/browser_benchmark.js b/benchmark/browser_benchmark.js
index 86e9f9b..b725272 100644
--- a/benchmark/browser_benchmark.js
+++ b/benchmark/browser_benchmark.js
@@ -3,7 +3,8 @@ if (process.title === 'browser') {
var strophe = require('Strophe.js');
var requestAnimationFrame = require('request-animation-frame').requestAnimationFrame;
} else {
- var ltx = require("../lib/index");
+ var path = "../lib/index";
+ var ltx = require(path);
}
var util = require('util');
@@ -69,17 +70,17 @@ LtxTest.prototype.traverse = function(node) {
function StropheTest() {
Test.call(this);
- this.name = "Strophe.js";
+
+ this.serialize = Strophe.serialize;
}
util.inherits(StropheTest, Test);
+StropheTest.prototype.name = "Strophe.js";
+
StropheTest.prototype.parse = function(s) {
return Strophe.xmlHtmlNode(s).firstChild;
};
-if (this.Strophe)
- StropheTest.prototype.serialize = Strophe.serialize;
-
StropheTest.prototype.traverse = function(node) {
while(node.firstChild)
node = node.firstChild;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list