Author: jmb
Date: Sun Jul 22 22:40:48 2007
New Revision: 3459
URL:
http://source.netsurf-browser.org?rev=3459&view=rev
Log:
Add omitted dom_document_create_comment API
Modified:
trunk/dom/include/dom/core/document.h
trunk/dom/src/core/document.c
Modified: trunk/dom/include/dom/core/document.h
URL:
http://source.netsurf-browser.org/trunk/dom/include/dom/core/document.h?r...
==============================================================================
--- trunk/dom/include/dom/core/document.h (original)
+++ trunk/dom/include/dom/core/document.h Sun Jul 22 22:40:48 2007
@@ -13,6 +13,7 @@
#include <dom/core/exceptions.h>
struct dom_attr;
+struct dom_characterdata;
struct dom_configuration;
struct dom_document;
struct dom_document_type;
@@ -35,6 +36,8 @@
struct dom_node **result);
dom_exception dom_document_create_text_node(struct dom_document *doc,
struct dom_string *data, struct dom_text **result);
+dom_exception dom_document_create_comment(struct dom_document *doc,
+ struct dom_string *data, struct dom_characterdata **result);
dom_exception dom_document_create_cdata_section(struct dom_document *doc,
struct dom_string *data, struct dom_text **result);
dom_exception dom_document_create_processing_instruction(
Modified: trunk/dom/src/core/document.c
URL:
http://source.netsurf-browser.org/trunk/dom/src/core/document.c?rev=3459&...
==============================================================================
--- trunk/dom/src/core/document.c (original)
+++ trunk/dom/src/core/document.c Sun Jul 22 22:40:48 2007
@@ -8,6 +8,7 @@
#include <dom/functypes.h>
#include <dom/core/document.h>
+#include "core/characterdata.h"
#include "core/document.h"
#include "core/namednodemap.h"
#include "core/node.h"
@@ -161,6 +162,28 @@
*/
dom_exception dom_document_create_text_node(struct dom_document *doc,
struct dom_string *data, struct dom_text **result)
+{
+ UNUSED(doc);
+ UNUSED(data);
+ UNUSED(result);
+
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Create a comment node
+ *
+ * \param doc The document owning the node
+ * \param data The data for the node
+ * \param result Pointer to location to receive result
+ * \return DOM_NO_ERR.
+ *
+ * The returned node will have its reference count increased. It is
+ * the responsibility of the caller to unref the node once it has
+ * finished with it.
+ */
+dom_exception dom_document_create_comment(struct dom_document *doc,
+ struct dom_string *data, struct dom_characterdata **result)
{
UNUSED(doc);
UNUSED(data);