summaryrefslogtreecommitdiff
path: root/src/core/element.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-09-25 00:02:07 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-09-25 00:02:07 +0000
commit4f82098cae7c00568c1ca436f0b2f8d1103d6760 (patch)
tree68a7efb856946deb63fb8e881078a04340b8ebd8 /src/core/element.c
parentcbfa1de186b10ca7fd192ca7d30e8466939f2a92 (diff)
downloadlibdom-4f82098cae7c00568c1ca436f0b2f8d1103d6760.tar.gz
libdom-4f82098cae7c00568c1ca436f0b2f8d1103d6760.tar.bz2
Add library-internal accessor to the head of an Element's attribute list (dom_element_get_first_attribute())
Implement dom_namednodemap_get_length() Implement dom_namednodemap_get_named_item() Implement dom_namednodemap_set_named_item() Implement dom_namednodemap_remove_named_item() Implement dom_namednodemap_item() All dom_namednodemap_*() still require support for maps of Entity and Notation nodes to be added (this requires DocumentType to gain support for these nodes). svn path=/trunk/dom/; revision=3591
Diffstat (limited to 'src/core/element.c')
-rw-r--r--src/core/element.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/element.c b/src/core/element.c
index a0f0b51..1b351ce 100644
--- a/src/core/element.c
+++ b/src/core/element.c
@@ -883,3 +883,14 @@ dom_exception dom_element_has_attributes(struct dom_element *element,
return DOM_NO_ERR;
}
+/**
+ * Retrieve a pointer to the first attribute attached to an element
+ *
+ * \param element The element to retrieve the first attribute from
+ * \return Pointer to first attribute, or NULL if none.
+ */
+struct dom_node *dom_element_get_first_attribute(struct dom_element *element)
+{
+ return (struct dom_node *) element->attributes;
+}
+