aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dom.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/dom.el b/lisp/dom.el
index 34df0e9af4c..7ff9e07b729 100644
--- a/lisp/dom.el
+++ b/lisp/dom.el
@@ -67,6 +67,12 @@
67 (setcdr old value) 67 (setcdr old value)
68 (setcar (cdr node) (nconc (cadr node) (list (cons attribute value))))))) 68 (setcar (cdr node) (nconc (cadr node) (list (cons attribute value)))))))
69 69
70(defun dom-remove-attribute (node attribute)
71 "Remove ATTRIBUTE from NODE."
72 (setq node (dom-ensure-node node))
73 (when-let ((old (assoc attribute (cadr node))))
74 (setcar (cdr node) (delq old (cadr node)))))
75
70(defmacro dom-attr (node attr) 76(defmacro dom-attr (node attr)
71 "Return the attribute ATTR from NODE. 77 "Return the attribute ATTR from NODE.
72A typical attribute is `href'." 78A typical attribute is `href'."