summaryrefslogtreecommitdiff
path: root/js/lib/node.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-15 13:07:31 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-15 13:07:31 -0800
commit2ecc11ea86b1d220f8d089a1680307a35437f6ef (patch)
treec6b8091078034cc85c5fa7fe25082d007a706b8c /js/lib/node.js
parente44eb21a558f6b80c0c038602baf77223709f1d9 (diff)
Renamed .t to ._type to mark it as "hidden."
Diffstat (limited to 'js/lib/node.js')
-rw-r--r--js/lib/node.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/lib/node.js b/js/lib/node.js
index 65f3814..9b77e2f 100644
--- a/js/lib/node.js
+++ b/js/lib/node.js
@@ -1,7 +1,7 @@
"use strict";
function isContainer(node) {
- switch (node.t) {
+ switch (node._type) {
case 'Document':
case 'BlockQuote':
case 'List':
@@ -63,7 +63,7 @@ var NodeWalker = function(root) {
};
var Node = function(nodeType, sourcepos) {
- this.t = nodeType;
+ this._type = nodeType;
this.parent = null;
this.firstChild = null;
this.lastChild = null;
@@ -90,7 +90,7 @@ Node.prototype.isContainer = function() {
};
Node.prototype.type = function() {
- return this.t;
+ return this._type;
};
Node.prototype.appendChild = function(child) {
@@ -221,7 +221,7 @@ module.exports = Node;
var event;
while (event = walker.next()) {
- console.log(event.entering, event.node.t);
+ console.log(event.entering, event.node.type());
}
*/