summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-05-04 22:46:56 +0100
committerVincent Sanders <vince@kyllikki.org>2019-05-04 22:48:50 +0100
commit38a65c0242ca7b32aa74537ab72d52510a9a32c8 (patch)
tree43d081d52d80be224bf16e42335fbca61184feca
parente8cd7c661499c8bfca26026e6291f1ed81c29194 (diff)
downloadnetsurf-38a65c0242ca7b32aa74537ab72d52510a9a32c8.tar.gz
netsurf-38a65c0242ca7b32aa74537ab72d52510a9a32c8.tar.bz2
add some comments to window location binding
-rw-r--r--content/handlers/javascript/duktape/Window.bnd2
1 files changed, 2 insertions, 0 deletions
diff --git a/content/handlers/javascript/duktape/Window.bnd b/content/handlers/javascript/duktape/Window.bnd
index 52181677c..c2f64280d 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -251,9 +251,11 @@ getter Window::console()
getter Window::location()
%{
+ /* obtain location object for this window (if it exists) */
duk_push_this(ctx);
duk_get_prop_string(ctx, -1, MAGIC(Location));
if (duk_is_undefined(ctx, -1)) {
+ /* location object did not previously exist so create it */
duk_pop(ctx);
duk_push_pointer(ctx, llcache_handle_get_url(priv->htmlc->base.llcache));