ELinks 0.19.1
location.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "document/document.h"
#include "document/view.h"
#include "js/ecmascript.h"
#include "js/quickjs.h"
#include "js/quickjs/location.h"
#include "protocol/uri.h"
#include "session/history.h"
#include "session/location.h"
#include "session/session.h"
#include "viewer/text/vs.h"
Include dependency graph for location.c:

Macros

#define countof(x)

Functions

static JSValue js_location_get_property_hash (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_host (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_hostname (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_href (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_origin (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_pathname (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_port (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_protocol (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_get_property_search (JSContext *ctx, JSValueConst this_val)
static JSValue js_location_set_property_hash (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_host (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_hostname (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_href (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_pathname (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_port (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_protocol (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_set_property_search (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_location_assign (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_location_reload (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_location_replace (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_location_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static void js_location_finalize (JSRuntime *rt, JSValue val)
JSValue js_location_init (JSContext *ctx)
JSValue getLocation (JSContext *ctx, struct view_state *vs)

Variables

static JSClassID js_location_class_id
static const JSCFunctionListEntry js_location_proto_funcs []
static JSClassDef js_location_class

Macro Definition Documentation

◆ countof

#define countof ( x)
Value:
(sizeof(x) / sizeof((x)[0]))

Function Documentation

◆ getLocation()

JSValue getLocation ( JSContext * ctx,
struct view_state * vs )

◆ js_location_assign()

JSValue js_location_assign ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_location_finalize()

void js_location_finalize ( JSRuntime * rt,
JSValue val )
static

◆ js_location_get_property_hash()

JSValue js_location_get_property_hash ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_host()

JSValue js_location_get_property_host ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_hostname()

JSValue js_location_get_property_hostname ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_href()

JSValue js_location_get_property_href ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_origin()

JSValue js_location_get_property_origin ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_pathname()

JSValue js_location_get_property_pathname ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_port()

JSValue js_location_get_property_port ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_protocol()

JSValue js_location_get_property_protocol ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_get_property_search()

JSValue js_location_get_property_search ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_location_init()

JSValue js_location_init ( JSContext * ctx)

◆ js_location_reload()

JSValue js_location_reload ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_location_replace()

JSValue js_location_replace ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_location_set_property_hash()

JSValue js_location_set_property_hash ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_host()

JSValue js_location_set_property_host ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_hostname()

JSValue js_location_set_property_hostname ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_href()

JSValue js_location_set_property_href ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_pathname()

JSValue js_location_set_property_pathname ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_port()

JSValue js_location_set_property_port ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_protocol()

JSValue js_location_set_property_protocol ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_set_property_search()

JSValue js_location_set_property_search ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_location_toString()

JSValue js_location_toString ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

Variable Documentation

◆ js_location_class

JSClassDef js_location_class
static
Initial value:
= {
"location",
.finalizer = js_location_finalize,
}
static void js_location_finalize(JSRuntime *rt, JSValue val)
Definition location.c:798

◆ js_location_class_id

JSClassID js_location_class_id
static

◆ js_location_proto_funcs

const JSCFunctionListEntry js_location_proto_funcs[]
static
Initial value:
= {
JS_CGETSET_DEF("origin", js_location_get_property_origin, NULL),
JS_CFUNC_DEF("assign", 1, js_location_assign),
JS_CFUNC_DEF("reload", 0, js_location_reload),
JS_CFUNC_DEF("replace", 1, js_location_replace),
JS_CFUNC_DEF("toString", 0, js_location_toString),
JS_CFUNC_DEF("toLocaleString", 0, js_location_toString),
}
#define NULL
Definition explodename.c:35
static JSValue js_location_get_property_protocol(JSContext *ctx, JSValueConst this_val)
Definition location.c:296
static JSValue js_location_get_property_hostname(JSContext *ctx, JSValueConst this_val)
Definition location.c:106
static JSValue js_location_set_property_hostname(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:450
static JSValue js_location_get_property_pathname(JSContext *ctx, JSValueConst this_val)
Definition location.c:220
static JSValue js_location_set_property_protocol(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:594
static JSValue js_location_get_property_origin(JSContext *ctx, JSValueConst this_val)
Definition location.c:182
static JSValue js_location_set_property_hash(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:378
static JSValue js_location_get_property_host(JSContext *ctx, JSValueConst this_val)
Definition location.c:68
static JSValue js_location_get_property_hash(JSContext *ctx, JSValueConst this_val)
Definition location.c:29
static JSValue js_location_set_property_port(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:558
static JSValue js_location_get_property_href(JSContext *ctx, JSValueConst this_val)
Definition location.c:144
static JSValue js_location_replace(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition location.c:726
static JSValue js_location_get_property_port(JSContext *ctx, JSValueConst this_val)
Definition location.c:259
static JSValue js_location_assign(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition location.c:666
static JSValue js_location_set_property_href(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:486
static JSValue js_location_toString(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition location.c:769
static JSValue js_location_get_property_search(JSContext *ctx, JSValueConst this_val)
Definition location.c:338
static JSValue js_location_set_property_host(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:414
static JSValue js_location_reload(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition location.c:699
static JSValue js_location_set_property_pathname(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:522
static JSValue js_location_set_property_search(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition location.c:630