summaryrefslogtreecommitdiff
path: root/javascript/jsapi/window.bnd
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/jsapi/window.bnd')
-rw-r--r--javascript/jsapi/window.bnd35
1 files changed, 17 insertions, 18 deletions
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index 937c150db..bba1eb7db 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -10,6 +10,7 @@
webidlfile "html.idl";
+webidlfile "dom.idl";
hdrcomment "Copyright 2012 Vincent Sanders <vince@netsurf-browser.org>";
hdrcomment "This file is part of NetSurf, http://www.netsurf-browser.org/";
@@ -19,7 +20,7 @@ hdrcomment " http://www.opensource.org/licenses/mit-license";
preamble %{
#include <dom/dom.h>
-
+
#include "utils/config.h"
#include "utils/log.h"
#include "utils/corestrings.h"
@@ -41,8 +42,6 @@ preamble %{
%}
-#include "dom.bnd"
-
binding window {
type js_libdom; /* the binding type */
@@ -109,7 +108,7 @@ api init %{
return NULL;
/* Initialises all the user javascript classes to make their
- * prototypes available.
+ * prototypes available.
*/
/** @todo should we be managing these prototype objects ourselves */
user_proto = jsapi_InitClass_Document(cx, prototype);
@@ -173,16 +172,16 @@ api new %{
/* @todo sort out windows that are not globals */
assert(parent == NULL);
- /* the window object is the global so its prototype *is* the instance */
- newobject = prototype;
+ /* the window object is the global so its prototype *is* the instance */
+ newobject = prototype;
/* instantiate the subclasses off the window global */
private->document = jsapi_new_Document(cx,
- NULL,
- newobject,
- (dom_document *)dom_node_ref(htmlc->document),
- htmlc);
- if (private->document == NULL) {
+ NULL,
+ newobject,
+ (dom_document *)dom_node_ref(htmlc->document),
+ htmlc);
+ if (private->document == NULL) {
free(private);
return NULL;
}
@@ -219,7 +218,7 @@ operation prompt %{
/* boolean dispatchEvent(Event event); */
operation dispatchEvent %{
/* this implementation is unique to the window object as it is
- * not a "real" dom node.
+ * not a "real" dom node.
*/
/* caution, this must match the struct generated from event.bnd */
@@ -249,7 +248,7 @@ operation dispatchEvent %{
jsret = JS_CallFunctionValue(cx, NULL, eventval, 1, event_argv, &event_rval);
}
}
- }
+ }
%}
getter location %{
@@ -268,18 +267,18 @@ getter self %{
getter EventHandler %{
/* this implementation is unique to the window object as it is
- * not a dom node.
+ * not a dom node.
*/
- JSLOG("propname[%d]=\"%s\"",
+ JSLOG("propname[%d]=\"%s\"",
tinyid,
jsclass_properties[tinyid].name);
%}
setter EventHandler %{
/* this implementation is unique to the window object as it is
- * not a dom node.
+ * not a dom node.
*/
- JSLOG("propname[%d]=\"%s\"",
- tinyid,
+ JSLOG("propname[%d]=\"%s\"",
+ tinyid,
jsclass_properties[tinyid].name);
%}