mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 23:05:51 +01:00
upgrade readability
This commit is contained in:
@@ -278,7 +278,7 @@
|
||||
|
||||
var whitespace = [" ", "\t", "\n", "\r"];
|
||||
|
||||
// See http://www.w3schools.com/dom/dom_nodetype.asp
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
||||
var nodeTypes = {
|
||||
ELEMENT_NODE: 1,
|
||||
ATTRIBUTE_NODE: 2,
|
||||
@@ -705,7 +705,6 @@
|
||||
}
|
||||
|
||||
// Using Array.join() avoids the overhead from lazy string concatenation.
|
||||
// See http://blog.cdleary.com/2012/01/string-representation-in-spidermonkey/#ropes
|
||||
var arr = [];
|
||||
getHTML(this);
|
||||
return arr.join("");
|
||||
@@ -875,7 +874,11 @@
|
||||
|
||||
JSDOMParser.prototype = {
|
||||
error: function(m) {
|
||||
dump("JSDOMParser error: " + m + "\n");
|
||||
if (typeof dump !== "undefined") {
|
||||
dump("JSDOMParser error: " + m + "\n");
|
||||
} else if (typeof console !== "undefined") {
|
||||
console.log("JSDOMParser error: " + m + "\n");
|
||||
}
|
||||
this.errorState += m + "\n";
|
||||
},
|
||||
|
||||
@@ -1187,3 +1190,7 @@
|
||||
global.JSDOMParser = JSDOMParser;
|
||||
|
||||
})(this);
|
||||
|
||||
if (typeof module === "object") {
|
||||
module.exports = this.JSDOMParser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user