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

Macros

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

Functions

static JSValue js_attr_get_property_name (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_attr_get_property_value (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_attr_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static void js_attr_finalizer (JSRuntime *rt, JSValue val)
 
JSValue getAttr (JSContext *ctx, void *node)
 

Variables

static JSClassID js_attr_class_id
 
static const JSCFunctionListEntry js_attr_proto_funcs []
 
void * map_attrs
 
static JSClassDef js_attr_class
 

Macro Definition Documentation

◆ countof

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

Function Documentation

◆ getAttr()

JSValue getAttr ( JSContext * ctx,
void * node )

◆ js_attr_finalizer()

static void js_attr_finalizer ( JSRuntime * rt,
JSValue val )
static

◆ js_attr_get_property_name()

static JSValue js_attr_get_property_name ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_attr_get_property_value()

static JSValue js_attr_get_property_value ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_attr_toString()

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

Variable Documentation

◆ js_attr_class

JSClassDef js_attr_class
static
Initial value:
= {
"attr",
}
static void js_attr_finalizer(JSRuntime *rt, JSValue val)
Definition attr.c:123

◆ js_attr_class_id

JSClassID js_attr_class_id
static

◆ js_attr_proto_funcs

const JSCFunctionListEntry js_attr_proto_funcs[]
static
Initial value:
= {
JS_CGETSET_DEF("name", js_attr_get_property_name, NULL),
JS_CGETSET_DEF("value", js_attr_get_property_value, NULL),
}
#define NULL
Definition explodename.c:35
static JSValue js_attr_get_property_name(JSContext *ctx, JSValueConst this_val)
Definition attr.c:25
static JSValue js_attr_get_property_value(JSContext *ctx, JSValueConst this_val)
Definition attr.c:67

◆ map_attrs

void* map_attrs