fgnass/domino — Issue #7: Issues in Document.js
Author: picco
Created: 2012-03-08 17:53:21+00:00
State: open

I had to comment out some lines in order to get this working:

// Add a mapping from id to n for n.ownerDocument
addId: { value: function addId(id, n) {
var val = this.byId[id];
if (!val) {
this.byId[id] = n;
}
else {
//warn('Duplicate element id ' + id);
if (!Array.isArray(val)) {
val = [val];
this.byId[id] = val;
}
val.push(n);
//val.sort(documentOrder);
}
}},

Errors:

warn('Duplicate element id ' + id);
^
ReferenceError: warn is not defined
at Object.addId (/var/node/pagetty/development/node_modules/domino/lib/Document.js:521:7)
at root (/var/node/pagetty/development/node_modules/domino/lib/Document.js:648:29)
at recursivelyRoot (/var/node/pagetty/development/node_modules/domino/lib/Document.js:667:3)
at Object. (/var/node/pagetty/development/node_modules/domino/lib/Document.js:491:5)
at HTMLDivElement.insert (/var/node/pagetty/development/node_modules/domino/lib/Node.js:394:37)
at HTMLDivElement. (/var/node/pagetty/development/node_modules/domino/lib/Node.js:97:11)
at insertElement (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2517:17)
at insertHTMLElement (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2500:5)
at in_body_mode (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:5463:9)
at insertToken (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2418:7)

val.sort(documentOrder);
^
ReferenceError: documentOrder is not defined
at Object.addId (/var/node/pagetty/development/node_modules/domino/lib/Document.js:527:16)
at root (/var/node/pagetty/development/node_modules/domino/lib/Document.js:648:29)
at recursivelyRoot (/var/node/pagetty/development/node_modules/domino/lib/Document.js:667:3)
at Object. (/var/node/pagetty/development/node_modules/domino/lib/Document.js:491:5)
at HTMLDivElement.insert (/var/node/pagetty/development/node_modules/domino/lib/Node.js:394:37)
at HTMLDivElement. (/var/node/pagetty/development/node_modules/domino/lib/Node.js:97:11)
at insertElement (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2517:17)
at insertHTMLElement (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2500:5)
at in_body_mode (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:5463:9)
at insertToken (/var/node/pagetty/development/node_modules/domino/lib/HTMLParser.js:2418:7)