Skip to content

Commit bf6ad8b

Browse files
committed
made get/set/remove-attributes be methods instead of functions
1 parent fde605a commit bf6ad8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/buildnode.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
((0 1) nil)
336336
(T (error "Couldnt parse attribute-name ~a into prefix and name" attribute)))))))
337337

338-
(defun get-attribute (elem attribute)
338+
(defmethod get-attribute (elem attribute)
339339
"Gets the value of an attribute on an element
340340
if the attribute does not exist return nil
341341
"
@@ -346,7 +346,7 @@
346346
(when (apply #'dom:has-attribute-ns args)
347347
(apply #'dom:get-attribute-ns args)))))
348348

349-
(defun set-attribute (elem attribute value)
349+
(defmethod set-attribute (elem attribute value)
350350
"Sets an attribute and passes the elem through, returns the elem. If value is nil, removes the attribute"
351351
(iter
352352
(with attr = (prepare-attribute-name attribute))
@@ -358,7 +358,7 @@
358358
(dom:remove-attribute-node e it))))
359359
elem)
360360

361-
(defun remove-attribute (elem attribute)
361+
(defmethod remove-attribute (elem attribute)
362362
"removes an attribute and passes the elem through, returns the elem
363363
If the attribute does not exist, simply skip it
364364
"

0 commit comments

Comments
 (0)