summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Readability.php b/src/Readability.php
index b0a5830..922e60f 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -78,6 +78,18 @@ class Readability extends Element implements ReadabilityInterface
}
/**
+ * Checks for the node type.
+ *
+ * @param string $value Type of node to compare to
+ *
+ * @return bool
+ */
+ public function nodeTypeEqualsTo($value)
+ {
+ return $this->node->nodeType === $value;
+ }
+
+ /**
* Get the ancestors of the current node.
*
* @param int $maxLevel Max amount of ancestors to get.