diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-03-24 21:20:08 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-03-24 21:20:08 +0000 |
commit | 5c4f19d1459f71dda7df2496bef1689ccffd1a53 (patch) | |
tree | 62297860b24702acb38b614687c0d066ea0596a4 | |
parent | 1f4fb216f359fc7e4dc3dff9b86e765377c99f23 (diff) | |
download | libdom-5c4f19d1459f71dda7df2496bef1689ccffd1a53.tar.gz libdom-5c4f19d1459f71dda7df2496bef1689ccffd1a53.tar.bz2 |
Only get value for elements with class.
svn path=/trunk/libdom/; revision=13627
-rw-r--r-- | src/core/element.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/element.c b/src/core/element.c index 8b4a7a8..b8e454e 100644 --- a/src/core/element.c +++ b/src/core/element.c @@ -315,6 +315,8 @@ static dom_attr_list * _dom_element_attr_list_node_create(dom_attr *attr, dom_element *ele, dom_string *name, dom_string *namespace) { dom_attr_list *new_list_node; + dom_node_internal *a; + dom_document *doc; if (attr == NULL || name == NULL) return NULL; @@ -329,7 +331,10 @@ static dom_attr_list * _dom_element_attr_list_node_create(dom_attr *attr, new_list_node->name = name; new_list_node->namespace = namespace; - if (namespace == NULL) { + a = (dom_node_internal *) attr; + doc = a->owner; + if (namespace == NULL && + dom_string_isequal(name, doc->class_string)) { dom_string *value; if (DOM_NO_ERR != _dom_attr_get_value(attr, &value)) { |