From 38a65c0242ca7b32aa74537ab72d52510a9a32c8 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 4 May 2019 22:46:56 +0100 Subject: add some comments to window location binding --- content/handlers/javascript/duktape/Window.bnd | 2 ++ 1 file changed, 2 insertions(+) (limited to 'content/handlers/javascript/duktape/Window.bnd') 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)); -- cgit v1.2.3