ELinks 0.18.0
message.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "js/ecmascript.h"
#include "js/quickjs.h"
#include "js/quickjs/message.h"
Include dependency graph for message.c:

Data Structures

struct  message_event

Macros

#define countof(x)

Functions

static JSValue js_messageEvent_get_property_data (JSContext *cx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_lastEventId (JSContext *cx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_origin (JSContext *cx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_source (JSContext *cx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_bubbles (JSContext *ctx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_cancelable (JSContext *ctx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_composed (JSContext *ctx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_defaultPrevented (JSContext *ctx, JSValueConst this_val)
static JSValue js_messageEvent_get_property_type (JSContext *ctx, JSValueConst this_val)
static JSValue js_messageEvent_preventDefault (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static void js_messageEvent_finalizer (JSRuntime *rt, JSValue val)
JSValue get_messageEvent (JSContext *ctx, char *data, char *origin, char *source)
static JSValue js_messageEvent_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_messageEvent_init (JSContext *ctx)

Variables

static JSClassID js_messageEvent_class_id
static JSClassDef js_messageEvent_class
static const JSCFunctionListEntry js_messageEvent_proto_funcs []
static int lastEventId

Macro Definition Documentation

◆ countof

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

Function Documentation

◆ get_messageEvent()

JSValue get_messageEvent ( JSContext * ctx,
char * data,
char * origin,
char * source )

◆ js_messageEvent_constructor()

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

◆ js_messageEvent_finalizer()

void js_messageEvent_finalizer ( JSRuntime * rt,
JSValue val )
static

◆ js_messageEvent_get_property_bubbles()

JSValue js_messageEvent_get_property_bubbles ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_cancelable()

JSValue js_messageEvent_get_property_cancelable ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_composed()

JSValue js_messageEvent_get_property_composed ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_data()

JSValue js_messageEvent_get_property_data ( JSContext * cx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_defaultPrevented()

JSValue js_messageEvent_get_property_defaultPrevented ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_lastEventId()

JSValue js_messageEvent_get_property_lastEventId ( JSContext * cx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_origin()

JSValue js_messageEvent_get_property_origin ( JSContext * cx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_source()

JSValue js_messageEvent_get_property_source ( JSContext * cx,
JSValueConst this_val )
static

◆ js_messageEvent_get_property_type()

JSValue js_messageEvent_get_property_type ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_messageEvent_init()

int js_messageEvent_init ( JSContext * ctx)

◆ js_messageEvent_preventDefault()

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

◆ 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

Variable Documentation

◆ js_messageEvent_class

JSClassDef js_messageEvent_class
static
Initial value:
= {
"MessageEvent",
}
static void js_messageEvent_finalizer(JSRuntime *rt, JSValue val)
Definition message.c:48

◆ js_messageEvent_class_id

JSClassID js_messageEvent_class_id
static

◆ js_messageEvent_proto_funcs

const JSCFunctionListEntry js_messageEvent_proto_funcs[]
static
Initial value:
= {
JS_CGETSET_DEF("bubbles", js_messageEvent_get_property_bubbles, NULL),
JS_CGETSET_DEF("cancelable", js_messageEvent_get_property_cancelable, NULL),
JS_CGETSET_DEF("composed", js_messageEvent_get_property_composed, NULL),
JS_CGETSET_DEF("data", js_messageEvent_get_property_data, NULL),
JS_CGETSET_DEF("defaultPrevented", js_messageEvent_get_property_defaultPrevented, NULL),
JS_CGETSET_DEF("lastEventId", js_messageEvent_get_property_lastEventId, NULL),
JS_CGETSET_DEF("origin", js_messageEvent_get_property_origin, NULL),
JS_CGETSET_DEF("source", js_messageEvent_get_property_source, NULL),
JS_CGETSET_DEF("type", js_messageEvent_get_property_type, NULL),
JS_CFUNC_DEF("preventDefault", 0, js_messageEvent_preventDefault),
}
#define NULL
Definition explodename.c:35
static JSValue js_messageEvent_get_property_cancelable(JSContext *ctx, JSValueConst this_val)
Definition message.c:104
static JSValue js_messageEvent_get_property_data(JSContext *cx, JSValueConst this_val)
Definition message.c:140
static JSValue js_messageEvent_get_property_bubbles(JSContext *ctx, JSValueConst this_val)
Definition message.c:86
static JSValue js_messageEvent_get_property_source(JSContext *cx, JSValueConst this_val)
Definition message.c:212
static JSValue js_messageEvent_get_property_defaultPrevented(JSContext *ctx, JSValueConst this_val)
Definition message.c:158
static JSValue js_messageEvent_get_property_origin(JSContext *cx, JSValueConst this_val)
Definition message.c:194
static JSValue js_messageEvent_get_property_composed(JSContext *ctx, JSValueConst this_val)
Definition message.c:122
static JSValue js_messageEvent_preventDefault(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
Definition message.c:252
static JSValue js_messageEvent_get_property_type(JSContext *ctx, JSValueConst this_val)
Definition message.c:230
static JSValue js_messageEvent_get_property_lastEventId(JSContext *cx, JSValueConst this_val)
Definition message.c:176

◆ lastEventId

int lastEventId
static