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.bnd21
1 files changed, 21 insertions, 0 deletions
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index bba1eb7db..b334cc7cc 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -40,6 +40,27 @@ preamble %{
#include "window.h"
#include "location.h"
+struct browser_window *jsapi_get_browser_window(JSContext *cx);
+
+%}
+
+prologue %{
+
+struct browser_window *jsapi_get_browser_window(JSContext *cx)
+{
+ struct jsclass_private *private;
+
+ private = JS_GetInstancePrivate(cx,
+ JS_GetGlobalObject(cx),
+ &JSClass_Window,
+ NULL);
+ if (private != NULL) {
+ return private->bw;
+ }
+
+ return NULL;
+}
+
%}
binding window {