ELinks 0.18.0
url.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "cache/cache.h"
#include "cookies/cookies.h"
#include "dialogs/menu.h"
#include "dialogs/status.h"
#include "document/html/frames.h"
#include "document/document.h"
#include "document/forms.h"
#include "document/view.h"
#include "js/ecmascript.h"
#include "js/quickjs.h"
#include "js/quickjs/url.h"
#include "js/timer.h"
#include "intl/libintl.h"
#include "main/select.h"
#include "main/timer.h"
#include "network/connection.h"
#include "osdep/newwin.h"
#include "osdep/sysname.h"
#include "protocol/http/http.h"
#include "protocol/uri.h"
#include "session/download.h"
#include "session/history.h"
#include "session/location.h"
#include "session/session.h"
#include "session/task.h"
#include "terminal/tab.h"
#include "terminal/terminal.h"
#include "util/conv.h"
#include "util/memory.h"
#include "util/string.h"
#include "viewer/text/draw.h"
#include "viewer/text/form.h"
#include "viewer/text/link.h"
#include "viewer/text/vs.h"
Include dependency graph for url.c:

Data Structures

struct  eljs_url

Macros

#define countof(x)

Functions

static void js_url_finalizer (JSRuntime *rt, JSValue val)
static JSValue js_url_get_property_hash (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_host (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_hostname (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_href (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_origin (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_pathname (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_port (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_protocol (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_get_property_search (JSContext *ctx, JSValueConst this_val)
static JSValue js_url_set_property_hash (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_host (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_hostname (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_href (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_pathname (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_port (JSContext *ctx, JSValueConst this_val, JSValue val)
static int get_protocol_length (const char *url)
static JSValue js_url_set_property_protocol (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_set_property_search (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_url_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_url_constructor (JSContext *ctx, JSValueConst new_target, int argc, JSValueConst *argv)
static void JS_NewGlobalCConstructor2 (JSContext *ctx, JSValue func_obj, const char *name, JSValueConst proto)
static JSValueConst JS_NewGlobalCConstructor (JSContext *ctx, const char *name, JSCFunction *func, int length, JSValueConst proto)
int js_url_init (JSContext *ctx)

Variables

static JSClassID js_url_class_id
static JSClassDef js_url_class
static const JSCFunctionListEntry js_url_proto_funcs []

Macro Definition Documentation

◆ countof

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

Function Documentation

◆ get_protocol_length()

int get_protocol_length ( const char * url)
inlinestatic

◆ JS_NewGlobalCConstructor()

JSValueConst JS_NewGlobalCConstructor ( JSContext * ctx,
const char * name,
JSCFunction * func,
int length,
JSValueConst proto )
static

◆ JS_NewGlobalCConstructor2()

void JS_NewGlobalCConstructor2 ( JSContext * ctx,
JSValue func_obj,
const char * name,
JSValueConst proto )
static

◆ js_url_constructor()

JSValue js_url_constructor ( JSContext * ctx,
JSValueConst new_target,
int argc,
JSValueConst * argv )
static

◆ js_url_finalizer()

void js_url_finalizer ( JSRuntime * rt,
JSValue val )
static

◆ js_url_get_property_hash()

JSValue js_url_get_property_hash ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_host()

JSValue js_url_get_property_host ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_hostname()

JSValue js_url_get_property_hostname ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_href()

JSValue js_url_get_property_href ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_origin()

JSValue js_url_get_property_origin ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_pathname()

JSValue js_url_get_property_pathname ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_port()

JSValue js_url_get_property_port ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_protocol()

JSValue js_url_get_property_protocol ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_get_property_search()

JSValue js_url_get_property_search ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_url_init()

int js_url_init ( JSContext * ctx)

◆ js_url_set_property_hash()

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

◆ js_url_set_property_host()

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

◆ js_url_set_property_hostname()

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

◆ js_url_set_property_href()

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

◆ js_url_set_property_pathname()

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

◆ js_url_set_property_port()

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

◆ js_url_set_property_protocol()

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

◆ js_url_set_property_search()

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

◆ js_url_toString()

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

Variable Documentation

◆ js_url_class

JSClassDef js_url_class
static
Initial value:
= {
"URL",
}
static void js_url_finalizer(JSRuntime *rt, JSValue val)
Definition url.c:64

◆ js_url_class_id

JSClassID js_url_class_id
static

◆ js_url_proto_funcs

const JSCFunctionListEntry js_url_proto_funcs[]
static
Initial value:
= {
JS_CGETSET_DEF("origin", js_url_get_property_origin, NULL),
JS_CFUNC_DEF("toString", 0, js_url_toString),
}
#define NULL
Definition explodename.c:35
static JSValue js_url_toString(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition url.c:620
static JSValue js_url_set_property_search(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:590
static JSValue js_url_set_property_href(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:437
static JSValue js_url_get_property_href(JSContext *ctx, JSValueConst this_val)
Definition url.c:171
static JSValue js_url_get_property_port(JSContext *ctx, JSValueConst this_val)
Definition url.c:254
static JSValue js_url_get_property_search(JSContext *ctx, JSValueConst this_val)
Definition url.c:312
static JSValue js_url_set_property_host(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:373
static JSValue js_url_get_property_hash(JSContext *ctx, JSValueConst this_val)
Definition url.c:88
static JSValue js_url_get_property_hostname(JSContext *ctx, JSValueConst this_val)
Definition url.c:144
static JSValue js_url_get_property_origin(JSContext *ctx, JSValueConst this_val)
Definition url.c:198
static JSValue js_url_set_property_port(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:504
static JSValue js_url_get_property_protocol(JSContext *ctx, JSValueConst this_val)
Definition url.c:281
static JSValue js_url_get_property_host(JSContext *ctx, JSValueConst this_val)
Definition url.c:117
static JSValue js_url_set_property_hostname(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:405
static JSValue js_url_set_property_hash(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:341
static JSValue js_url_set_property_protocol(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:557
static JSValue js_url_set_property_pathname(JSContext *ctx, JSValueConst this_val, JSValue val)
Definition url.c:473
static JSValue js_url_get_property_pathname(JSContext *ctx, JSValueConst this_val)
Definition url.c:225