add some comments to window location binding

This commit is contained in:
Vincent Sanders 2019-05-04 22:46:56 +01:00
parent e8cd7c6614
commit 38a65c0242
1 changed files with 2 additions and 0 deletions

View File

@ -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));