summaryrefslogtreecommitdiff
path: root/src/core/document.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/document.c')
-rw-r--r--src/core/document.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/document.c b/src/core/document.c
index 22f08f1..a78cde9 100644
--- a/src/core/document.c
+++ b/src/core/document.c
@@ -147,6 +147,14 @@ dom_exception _dom_document_initialise(dom_document *doc,
return err;
}
+ err = dom_string_create_interned((const uint8_t *) "script",
+ SLEN("script"), &doc->script_string);
+ if (err != DOM_NO_ERR) {
+ dom_string_unref(doc->id_name);
+ dom_string_unref(doc->class_string);
+ return err;
+ }
+
/* Intern the empty string. The use of a space in the constant
* is to prevent the compiler warning about an empty string.
*/
@@ -155,6 +163,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
if (err != DOM_NO_ERR) {
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -165,6 +174,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -176,6 +186,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -188,6 +199,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -201,6 +213,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -215,6 +228,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -230,6 +244,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -246,6 +261,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -283,6 +299,7 @@ bool _dom_document_finalise(dom_document *doc)
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->_memo_domnodeinserted);
dom_string_unref(doc->_memo_domnoderemoved);