Permalink
Browse files

Return builder object, not 'build' function directly

  • Loading branch information...
medikoo committed Aug 18, 2011
1 parent dffb551 commit 08029fc5c8b45d785dea872f412d57cb1de5f31f
Showing with 2 additions and 6 deletions.
  1. +1 −5 lib/html5.js
  2. +1 −1 test/html5.js
View
@@ -27,9 +27,5 @@ html5js = Object.freeze(extend(Object.create(domjs), {
'tr', 'track', 'ul', 'var', 'video', 'wbr']));
module.exports = function (document) {
- var builder = Object.create(html5js).init(document);
-
- return function (f) {
- return builder.build(f);
- };
+ return Object.create(html5js).init(document);
};
View
@@ -5,7 +5,7 @@ var document = new (require('jsdom/lib/jsdom/level3/core')
module.exports = function (t, a) {
var dom, handler = function () { };
- a(t(document)(function () {
+ a(t(document).build(function () {
div({ onclick: handler });
}).firstChild.onclick, handler, "Function event handler");
};

0 comments on commit 08029fc

Please sign in to comment.