summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/dom-str.c27
-rw-r--r--src/util/dom-str.h3
2 files changed, 30 insertions, 0 deletions
diff --git a/src/util/dom-str.c b/src/util/dom-str.c
index b959afe..03fdd9e 100644
--- a/src/util/dom-str.c
+++ b/src/util/dom-str.c
@@ -15,7 +15,10 @@
#include "util/util.h"
dom_string *nsl_dom_str_node_inserted;
+dom_string *nsl_dom_str_node_removed;
dom_string *nsl_dom_str_subtree_modified;
+dom_string *nsl_dom_str_attr_modified;
+dom_string *nsl_dom_str_characterdata_modified;
/* Exported function, documented in src/util/dom-str.h */
@@ -31,6 +34,14 @@ nslayout_error nsl_dom_str_init(void)
printf("Failed to create string!\n");
return NSLAYOUT_NO_MEM;
}
+ exc = dom_string_create((const uint8_t *)"DOMNodeRemoved",
+ SLEN("DOMNodeRemoved"),
+ &nsl_dom_str_node_removed);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
exc = dom_string_create((const uint8_t *)"DOMSubtreeModified",
SLEN("DOMSubtreeModified"),
&nsl_dom_str_subtree_modified);
@@ -39,6 +50,22 @@ nslayout_error nsl_dom_str_init(void)
printf("Failed to create string!\n");
return NSLAYOUT_NO_MEM;
}
+ exc = dom_string_create((const uint8_t *)"DOMAttrModified",
+ SLEN("DOMAttrModified"),
+ &nsl_dom_str_attr_modified);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
+ exc = dom_string_create((const uint8_t *)"DOMCharacterDataModified",
+ SLEN("DOMCharacterDataModified"),
+ &nsl_dom_str_characterdata_modified);
+ if (exc != DOM_NO_ERR) {
+ /* TODO: free stuff, return value */
+ printf("Failed to create string!\n");
+ return NSLAYOUT_NO_MEM;
+ }
return NSLAYOUT_OK;
}
diff --git a/src/util/dom-str.h b/src/util/dom-str.h
index 9a51ad5..7c130c3 100644
--- a/src/util/dom-str.h
+++ b/src/util/dom-str.h
@@ -14,7 +14,10 @@
#include <libnslayout/nslayout.h>
extern dom_string *nsl_dom_str_node_inserted;
+extern dom_string *nsl_dom_str_node_removed;
extern dom_string *nsl_dom_str_subtree_modified;
+extern dom_string *nsl_dom_str_attr_modified;
+extern dom_string *nsl_dom_str_characterdata_modified;
/**
* Create the internal DOM strings