summaryrefslogtreecommitdiff
path: root/javascript/jsapi/window.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/window.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/window.bnd')
-rw-r--r--javascript/jsapi/window.bnd9
1 files changed, 8 insertions, 1 deletions
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 288b5b3d8..937c150db 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -8,7 +8,6 @@
* http://www.opensource.org/licenses/mit-license
*/
-#include "dom.bnd"
webidlfile "html.idl";
@@ -35,12 +34,15 @@ preamble %{
#include "nodelist.h"
#include "htmldocument.h"
#include "text.h"
+#include "comment.h"
#include "htmlelement.h"
#include "window.h"
#include "location.h"
%}
+#include "dom.bnd"
+
binding window {
type js_libdom; /* the binding type */
@@ -150,6 +152,11 @@ api init %{
return NULL;
}
+ user_proto = jsapi_InitClass_Comment(cx, prototype);
+ if (user_proto == NULL) {
+ return NULL;
+ }
+
user_proto = jsapi_InitClass_Node(cx, prototype);
if (user_proto == NULL) {
return NULL;