Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
feat(node.js): add type property
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Mar 28, 2017
1 parent 6b2f9c5 commit e4a7127
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit e4a7127

Please sign in to comment.