Function: eww--alternate-urls

eww--alternate-urls is a byte-compiled function defined in eww.el.gz.

Signature

(eww--alternate-urls DOM &optional BASE)

Documentation

Return a list of alternate links in DOM.

Each element is a string URL, which is the href attribute of the link, expanded relative to BASE. Each URL string has text properties \+type which is the link's type attribute, and \+title, its title attribute.

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
;;; Alternate links (RSS and Atom feeds, etc.)

(defun eww--alternate-urls (dom &optional base)
  "Return a list of alternate links in DOM.

Each element is a string URL, which is the href attribute of the link,
expanded relative to BASE.  Each URL string has text properties \\+`type'
which is the link's type attribute, and \\+`title', its title attribute."
  (seq-keep
   (lambda (link)
     (let ((attrs (dom-attributes link)))
       (when (equal (alist-get 'rel attrs) "alternate")
         (propertize
          (url-expand-file-name (alist-get 'href attrs) base)
          'type  (alist-get 'type attrs)
          'title (or (alist-get 'title attrs) "")))))
   (dom-by-tag dom 'link)))