Function: eww-handle-link
eww-handle-link is a byte-compiled function defined in eww.el.gz.
Signature
(eww-handle-link DOM)
Source Code
;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun eww-handle-link (dom)
(let* ((rel (dom-attr dom 'rel))
(href (dom-attr dom 'href))
(where (assoc
;; The text associated with :rel is case-insensitive.
(if rel (downcase rel))
'(("next" . :next)
;; Texinfo uses "previous", but HTML specifies
;; "prev", so recognize both.
("previous" . :previous)
("prev" . :previous)
;; HTML specifies "start" but also "contents",
;; and Gtk seems to use "home". Recognize
;; them all; but store them in different
;; variables so that we can readily choose the
;; "best" one.
("start" . :start)
("home" . :home)
("contents" . :contents)
("up" . :up)))))
(when (and href where)
(when (memq (cdr where) '(:next :previous))
;; Multi-page isearch support.
(setq-local multi-isearch-next-buffer-function
#'eww-isearch-next-buffer))
(plist-put eww-data (cdr where) href))))