mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-25 02:44:56 +03:00
expose the location object through document as well as window
This commit is contained in:
parent
73c6476112
commit
63dba3a061
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user