#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "html/html_document.h"
#include "html/html_element.h"
#include "core/node.h"
#include "core/attr.h"
#include "core/document.h"
#include "utils/utils.h"
|
dom_exception | _dom_html_element_create (struct dom_html_element_create_params *params, struct dom_html_element **result) |
|
dom_exception | _dom_html_element_initialise (struct dom_html_element_create_params *params, struct dom_html_element *el) |
|
void | _dom_html_element_finalise (struct dom_html_element *ele) |
|
void | _dom_html_element_destroy (dom_node_internal *node) |
|
dom_exception | _dom_html_element_copy (dom_node_internal *old, dom_node_internal **copy) |
|
dom_exception | _dom_html_element_copy_internal (dom_html_element *old, dom_html_element *new) |
|
dom_exception | _dom_html_element_get_attribute (struct dom_element *element, dom_string *name, dom_string **value) |
|
dom_exception | _dom_html_element_set_attribute (struct dom_element *element, dom_string *name, dom_string *value) |
|
dom_exception | _dom_html_element_remove_attribute (struct dom_element *element, dom_string *name) |
|
dom_exception | _dom_html_element_has_attribute (struct dom_element *element, dom_string *name, bool *result) |
|
dom_exception | _dom_html_element_get_elements_by_tag_name (struct dom_element *element, dom_string *name, struct dom_nodelist **result) |
|
dom_exception | _dom_html_element_get_elements_by_tag_name_ns (struct dom_element *element, dom_string *namespace, dom_string *localname, struct dom_nodelist **result) |
|
dom_exception | _dom_html_element_get_tag_type (const struct dom_html_element *element, dom_html_element_type *type) |
|
dom_exception | dom_html_element_get_bool_property (dom_html_element *ele, const char *name, uint32_t len, bool *has) |
|
dom_exception | dom_html_element_set_bool_property (dom_html_element *ele, const char *name, uint32_t len, bool has) |
|
dom_exception | dom_html_element_get_int32_t_property (dom_html_element *ele, const char *name, uint32_t len, int32_t *value) |
|
dom_exception | dom_html_element_set_int32_t_property (dom_html_element *ele, const char *name, uint32_t len, uint32_t value) |
|
dom_exception | dom_html_element_get_dom_ulong_property (dom_html_element *ele, const char *name, uint32_t len, dom_ulong *value) |
|
dom_exception | dom_html_element_set_dom_ulong_property (dom_html_element *ele, const char *name, uint32_t len, dom_ulong value) |
|
◆ SIMPLE_GET_SET
#define SIMPLE_GET_SET |
( |
| fattr, |
|
|
| attr ) |
Value:
{ \
\
_memo_##attr = \
\
\
return ret; \
} \
\
{ \
\
_memo_##attr = \
\
\
return ret; \
}
dom_exception
Definition exceptions.h:24
#define dom_element_get_attribute(e, n, v)
Definition element.h:117
#define dom_element_set_attribute(e, n, v)
Definition element.h:127
Definition html_document.h:19
Definition html_element.h:22
◆ _dom_html_element_copy()
◆ _dom_html_element_copy_internal()
◆ _dom_html_element_create()
◆ _dom_html_element_destroy()
◆ _dom_html_element_finalise()
◆ _dom_html_element_get_attribute()
◆ _dom_html_element_get_elements_by_tag_name()
Retrieve a list of descendant elements of an element which match a given tag name (caselessly)
- Parameters
-
element | The root of the subtree to search |
name | The tag name to match (or "*" for all tags) |
result | Pointer to location to receive result |
- Returns
- DOM_NO_ERR.
The returned nodelist will have its reference count increased. It is the responsibility of the caller to unref the nodelist once it has finished with it.
◆ _dom_html_element_get_elements_by_tag_name_ns()
Retrieve a list of descendant elements of an element which match a given namespace/localname pair, caselessly.
- Parameters
-
element | The root of the subtree to search |
namespace | The namespace URI to match (or "*" for all) |
localname | The local name to match (or "*" for all) |
result | Pointer to location to receive result |
- Returns
- DOM_NO_ERR on success, DOM_NOT_SUPPORTED_ERR if the implementation does not support the feature "XML" and the language exposed through the Document does not support Namespaces.
The returned nodelist will have its reference count increased. It is the responsibility of the caller to unref the nodelist once it has finished with it.
- Todo
- ensure XML feature is supported
◆ _dom_html_element_get_tag_type()
Retrieve an HTML element's tag type.
- Parameters
-
element | The element to get the tag type of. |
type | Updated to the tag type of the element. |
- Returns
- DOM_NO_ERR
Elements with non-standard tags will be DOM_HTML_ELEMENT_TYPE__UNKNOWN.
◆ _dom_html_element_has_attribute()
◆ _dom_html_element_initialise()
◆ _dom_html_element_remove_attribute()
◆ _dom_html_element_set_attribute()
◆ dom_html_element_get_bool_property()
Get the a bool property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
has | The returned status |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ dom_html_element_get_dom_ulong_property()
Get the a dom_ulong property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
value | The returned value, or -1 if prop. not set |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ dom_html_element_get_int32_t_property()
Get the a int32_t property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
value | The returned value, or -1 if prop. not set |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ dom_html_element_set_bool_property()
Set a bool property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
has | The status |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ dom_html_element_set_dom_ulong_property()
Set a dom_ulong property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
value | The value |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ dom_html_element_set_int32_t_property()
Set a int32_t property
- Parameters
-
ele | The dom_html_element object |
name | The name of the attribute |
len | The length of ::name |
value | The value |
- Returns
- DOM_NO_ERR on success, appropriate dom_exception on failure.
◆ _dom_html_element_vtable
Initial value:= {
{
{
{
},
},
},
}
#define DOM_NODE_VTABLE_ELEMENT
Definition element.h:147
#define DOM_NODE_EVENT_TARGET_VTABLE
Definition node.h:188
#define DOM_ELEMENT_VTABLE_HTML_ELEMENT
Definition html_element.h:77
#define DOM_HTML_ELEMENT_VTABLE
Definition html_element.h:130