ELinks 0.18.0
node.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "js/ecmascript.h"
#include "js/quickjs/mapa.h"
#include "js/quickjs.h"
#include "js/quickjs/attr.h"
#include "js/quickjs/document.h"
#include "js/quickjs/element.h"
#include "js/quickjs/fragment.h"
#include "js/quickjs/node.h"
#include "js/quickjs/nodelist.h"
#include "js/quickjs/text.h"
Include dependency graph for node.c:

Macros

#define countof(x)

Enumerations

enum  {
  ELEMENT_NODE = 1 , ATTRIBUTE_NODE = 2 , TEXT_NODE = 3 , CDATA_SECTION_NODE = 4 ,
  PROCESSING_INSTRUCTION_NODE = 7 , COMMENT_NODE = 8 , DOCUMENT_NODE = 9 , DOCUMENT_TYPE_NODE = 10 ,
  DOCUMENT_FRAGMENT_NODE = 11
}

Functions

JSValue getNode (JSContext *ctx, void *n)
static JSValue node_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_node_init (JSContext *ctx)

Variables

static JSClassID js_node_class_id
static const JSCFunctionListEntry node_class_funcs []
static JSClassDef node_class

Macro Definition Documentation

◆ countof

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ELEMENT_NODE 
ATTRIBUTE_NODE 
TEXT_NODE 
CDATA_SECTION_NODE 
PROCESSING_INSTRUCTION_NODE 
COMMENT_NODE 
DOCUMENT_NODE 
DOCUMENT_TYPE_NODE 
DOCUMENT_FRAGMENT_NODE 

Function Documentation

◆ getNode()

JSValue getNode ( JSContext * ctx,
void * n )

◆ 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_node_init()

int js_node_init ( JSContext * ctx)

◆ node_constructor()

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

Variable Documentation

◆ js_node_class_id

JSClassID js_node_class_id
static

◆ node_class

JSClassDef node_class
static
Initial value:
= {
"Node",
}

◆ node_class_funcs

const JSCFunctionListEntry node_class_funcs[]
static
Initial value:
= {
JS_PROP_INT32_DEF("ELEMENT_NODE", ELEMENT_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("ATTRIBUTE_NODE", ATTRIBUTE_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("TEXT_NODE", TEXT_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("CDATA_SECTION_NODE", CDATA_SECTION_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("PROCESSING_INSTRUCTION_NODE", PROCESSING_INSTRUCTION_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("COMMENT_NODE", COMMENT_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("DOCUMENT_NODE", DOCUMENT_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("DOCUMENT_TYPE_NODE", DOCUMENT_TYPE_NODE, JS_PROP_ENUMERABLE),
JS_PROP_INT32_DEF("DOCUMENT_FRAGMENT_NODE", DOCUMENT_FRAGMENT_NODE, JS_PROP_ENUMERABLE),
}
@ DOCUMENT_TYPE_NODE
Definition node.c:70
@ COMMENT_NODE
Definition node.c:68
@ CDATA_SECTION_NODE
Definition node.c:66
@ ELEMENT_NODE
Definition node.c:63
@ PROCESSING_INSTRUCTION_NODE
Definition node.c:67
@ DOCUMENT_NODE
Definition node.c:69
@ DOCUMENT_FRAGMENT_NODE
Definition node.c:71
@ ATTRIBUTE_NODE
Definition node.c:64
@ TEXT_NODE
Definition node.c:65