diff --git a/lib/node.js b/lib/node.js index 6a066e9..42db052 100644 --- a/lib/node.js +++ b/lib/node.js @@ -137,6 +137,18 @@ class Node { return this.get().name } + + /** + * Returns the type of this node + * @see node-html-light.Node.TYPE_COMMENT + * @see node-html-light.Node.TYPE_TAG + * @see node-html-light.Node.TYPE_TEXT + * @returns {string} + */ + get type() { + return this.get().type + } + /** * Returns the parent node of this node * @returns {Node}