summaryrefslogtreecommitdiff
path: root/javascript/jsapi/comment.bnd
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2013-01-02 17:19:32 +0000
committerVincent Sanders <vince@kyllikki.org>2013-01-02 23:14:30 +0000
commit1b8f9daa51c901119d4dc27f82fb993fc8378bd0 (patch)
treea96ae02f5f17bf1fe1a134fb372c59859bed9598 /javascript/jsapi/comment.bnd
parent3f33f5327e783b3f4d7474007672c2c60a2969ea (diff)
downloadnetsurf-1b8f9daa51c901119d4dc27f82fb993fc8378bd0.tar.gz
netsurf-1b8f9daa51c901119d4dc27f82fb993fc8378bd0.tar.bz2
Initial implementation of document.createComment
Improve robustness of jsobject to libdom object conversion in appendChild
Diffstat (limited to 'javascript/jsapi/comment.bnd')
-rw-r--r--javascript/jsapi/comment.bnd47
1 files changed, 47 insertions, 0 deletions
diff --git a/javascript/jsapi/comment.bnd b/javascript/jsapi/comment.bnd
new file mode 100644
index 000000000..580f5cbed
--- /dev/null
+++ b/javascript/jsapi/comment.bnd
@@ -0,0 +1,47 @@
+/* Binding to generate Comment interface
+ *
+ * Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * Released under the terms of the MIT License,
+ * http://www.opensource.org/licenses/mit-license
+ */
+
+
+webidlfile "html.idl";
+
+hdrcomment "Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>";
+hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/";
+hdrcomment "Released under the terms of the MIT License,";
+hdrcomment " http://www.opensource.org/licenses/mit-license";
+
+preamble %{
+
+#include <dom/dom.h>
+
+#include "utils/config.h"
+#include "utils/log.h"
+#include "render/html_internal.h"
+#include "javascript/jsapi.h"
+
+#include "comment.h"
+
+%}
+
+#include "dom.bnd"
+
+binding comment {
+ type js_libdom; /* the binding type */
+
+ interface Comment; /* Web IDL interface to generate */
+
+ private "dom_comment *" node;
+ private "struct html_content *" htmlc;
+}
+
+api finalise %{
+ if (private != NULL) {
+ dom_node_unref(private->node);
+ }
+%}