Function: eww--dom-count-words

eww--dom-count-words is a byte-compiled function defined in eww.el.gz.

Signature

(eww--dom-count-words NODE)

Documentation

Return the number of words in all the textual data under NODE.

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun eww--dom-count-words (node)
  "Return the number of words in all the textual data under NODE."
  (cond
   ((stringp node)
    (eww--string-count-words node))
   ((memq (dom-tag node) '(script comment))
    0)
   (t
    (let ((total 0))
      (dolist (elem (dom-children node) total)
        (incf total (eww--dom-count-words elem)))))))