diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-01-27 17:58:27 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-01-27 17:58:27 +0000 |
commit | 9def0a44e12c1469e0e4af2881242f5f1df9b3a0 (patch) | |
tree | 1cc1a2e934354e75e609357d7627e16371a0e50c /src/html/html_base_element.c | |
parent | 410274173d434e34a5eb085d13228d68cd44d509 (diff) | |
parent | 5b6c1914915e4c6c1b69e4c56cd60705e40daff3 (diff) | |
download | libdom-9def0a44e12c1469e0e4af2881242f5f1df9b3a0.tar.gz libdom-9def0a44e12c1469e0e4af2881242f5f1df9b3a0.tar.bz2 |
Merge branch 'tlsa/html-element-type'
Diffstat (limited to 'src/html/html_base_element.c')
-rw-r--r-- | src/html/html_base_element.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/html/html_base_element.c b/src/html/html_base_element.c index 6be8e3a..55bbd94 100644 --- a/src/html/html_base_element.c +++ b/src/html/html_base_element.c @@ -28,6 +28,7 @@ static struct dom_element_protected_vtable _protect_vtable = { * \return DOM_NO_ERR on success, appropriate dom_exception on failure. */ dom_exception _dom_html_base_element_create(struct dom_html_document *doc, + dom_string *namespace, dom_string *prefix, struct dom_html_base_element **ele) { struct dom_node_internal *node; @@ -41,7 +42,7 @@ dom_exception _dom_html_base_element_create(struct dom_html_document *doc, node->base.vtable = &_dom_html_element_vtable; node->vtable = &_protect_vtable; - return _dom_html_base_element_initialise(doc, *ele); + return _dom_html_base_element_initialise(doc, namespace, prefix, *ele); } /** @@ -52,19 +53,12 @@ dom_exception _dom_html_base_element_create(struct dom_html_document *doc, * \return DOM_NO_ERR on success, appropriate dom_exception on failure. */ dom_exception _dom_html_base_element_initialise(struct dom_html_document *doc, + dom_string *namespace, dom_string *prefix, struct dom_html_base_element *ele) { - dom_string *name = NULL; - dom_exception err; - - err = dom_string_create((const uint8_t *) "BASE", SLEN("BASE"), &name); - if (err != DOM_NO_ERR) - return err; - - err = _dom_html_element_initialise(doc, &ele->base, name, NULL, NULL); - dom_string_unref(name); - - return err; + return _dom_html_element_initialise(doc, &ele->base, + doc->elements[DOM_HTML_ELEMENT_TYPE_BASE], + namespace, prefix); } /** |