summaryrefslogtreecommitdiff
path: root/javascript/duktape/Document.bnd
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/duktape/Document.bnd')
-rw-r--r--javascript/duktape/Document.bnd13
1 files changed, 13 insertions, 0 deletions
diff --git a/javascript/duktape/Document.bnd b/javascript/duktape/Document.bnd
index 6d11ea9c8..0b478d5f5 100644
--- a/javascript/duktape/Document.bnd
+++ b/javascript/duktape/Document.bnd
@@ -154,6 +154,19 @@ getter Document::body()
return 0; /* coerced to undefined */
%}
+getter Document::location()
+%{
+ /* retrieve the location object from the root object (window) */
+ duk_push_global_object(ctx);
+ duk_get_prop_string(ctx, -1, "location");
+ if (duk_is_undefined(ctx, -1)) {
+ duk_pop(ctx);
+ return 0;
+ }
+ return 1;
+%}
+
+
method Document::getElementById()
%{
dom_string *elementId_dom;