ELinks 0.18.0
fragment.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dialogs/status.h"
#include "document/document.h"
#include "document/libdom/corestrings.h"
#include "document/libdom/doc.h"
#include "document/libdom/mapa.h"
#include "document/libdom/renderer2.h"
#include "document/view.h"
#include "js/ecmascript.h"
#include "js/ecmascript-c.h"
#include "js/quickjs/mapa.h"
#include "js/quickjs.h"
#include "js/quickjs/attr.h"
#include "js/quickjs/attributes.h"
#include "js/quickjs/collection.h"
#include "js/quickjs/dataset.h"
#include "js/quickjs/domrect.h"
#include "js/quickjs/document.h"
#include "js/quickjs/element.h"
#include "js/quickjs/event.h"
#include "js/quickjs/fragment.h"
#include "js/quickjs/heartbeat.h"
#include "js/quickjs/keyboard.h"
#include "js/quickjs/node.h"
#include "js/quickjs/nodelist.h"
#include "js/quickjs/nodelist2.h"
#include "js/quickjs/style.h"
#include "js/quickjs/tokenlist.h"
#include "js/quickjs/window.h"
#include "session/session.h"
#include "terminal/event.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 fragment.c:

Data Structures

struct  fragment_listener
struct  js_fragment_private

Macros

#define countof(x)

Functions

static void fragment_event_handler (dom_event *event, void *pw)
static JSValue js_fragment_set_property_textContent (JSContext *ctx, JSValueConst this_val, JSValue val)
void * js_getopaque_fragment (JSValueConst obj, JSClassID class_id)
void * fragment_get_node (JSValueConst obj)
static JSValue js_fragment_get_property_children (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_childElementCount (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_childNodes (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_firstChild (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_firstElementChild (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_lastChild (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_lastElementChild (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_nodeName (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_nodeType (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_nodeValue (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_set_property_nodeValue (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_fragment_get_property_nextSibling (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_ownerDocument (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_parentElement (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_parentNode (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_previousSibling (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_get_property_textContent (JSContext *ctx, JSValueConst this_val)
static JSValue js_fragment_dispatchEvent (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_addEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_removeEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_appendChild (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_cloneNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_contains (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_hasChildNodes (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_insertBefore (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_isEqualNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_isSameNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_querySelector (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_querySelectorAll (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_removeChild (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_fragment_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static void js_fragment_finalizer (JSRuntime *rt, JSValue val)
static void js_fragment_mark (JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
static JSValue js_DocumentFragment_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_fragment_init (JSContext *ctx)
JSValue getDocumentFragment (JSContext *ctx, void *node)

Variables

JSClassID js_fragment_class_id
static const JSCFunctionListEntry js_fragment_proto_funcs []
static JSClassDef js_fragment_class

Macro Definition Documentation

◆ countof

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

Function Documentation

◆ fragment_event_handler()

void fragment_event_handler ( dom_event * event,
void * pw )
static

◆ fragment_get_node()

void * fragment_get_node ( JSValueConst obj)

◆ getDocumentFragment()

JSValue getDocumentFragment ( JSContext * ctx,
void * node )

◆ js_DocumentFragment_constructor()

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

◆ js_fragment_addEventListener()

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

◆ js_fragment_appendChild()

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

◆ js_fragment_cloneNode()

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

◆ js_fragment_contains()

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

◆ js_fragment_dispatchEvent()

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

◆ js_fragment_finalizer()

void js_fragment_finalizer ( JSRuntime * rt,
JSValue val )
static

◆ js_fragment_get_property_childElementCount()

JSValue js_fragment_get_property_childElementCount ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_childNodes()

JSValue js_fragment_get_property_childNodes ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_children()

JSValue js_fragment_get_property_children ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_firstChild()

JSValue js_fragment_get_property_firstChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_firstElementChild()

JSValue js_fragment_get_property_firstElementChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_lastChild()

JSValue js_fragment_get_property_lastChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_lastElementChild()

JSValue js_fragment_get_property_lastElementChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_nextSibling()

JSValue js_fragment_get_property_nextSibling ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_nodeName()

JSValue js_fragment_get_property_nodeName ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_nodeType()

JSValue js_fragment_get_property_nodeType ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_nodeValue()

JSValue js_fragment_get_property_nodeValue ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_ownerDocument()

JSValue js_fragment_get_property_ownerDocument ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_parentElement()

JSValue js_fragment_get_property_parentElement ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_parentNode()

JSValue js_fragment_get_property_parentNode ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_previousSibling()

JSValue js_fragment_get_property_previousSibling ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_get_property_textContent()

JSValue js_fragment_get_property_textContent ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_fragment_hasChildNodes()

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

◆ js_fragment_init()

int js_fragment_init ( JSContext * ctx)

◆ js_fragment_insertBefore()

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

◆ js_fragment_isEqualNode()

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

◆ js_fragment_isSameNode()

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

◆ js_fragment_mark()

void js_fragment_mark ( JSRuntime * rt,
JSValueConst val,
JS_MarkFunc * mark_func )
static

◆ js_fragment_querySelector()

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

◆ js_fragment_querySelectorAll()

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

◆ js_fragment_removeChild()

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

◆ js_fragment_removeEventListener()

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

◆ js_fragment_set_property_nodeValue()

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

◆ js_fragment_set_property_textContent()

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

◆ js_fragment_toString()

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

◆ js_getopaque_fragment()

void * js_getopaque_fragment ( JSValueConst obj,
JSClassID class_id )

◆ 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_fragment_class

JSClassDef js_fragment_class
static
Initial value:
= {
"DocumentFragment",
.finalizer = js_fragment_finalizer,
.gc_mark = js_fragment_mark,
}
static void js_fragment_mark(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
Definition fragment.c:1624
static void js_fragment_finalizer(JSRuntime *rt, JSValue val)
Definition fragment.c:1582

◆ js_fragment_class_id

JSClassID js_fragment_class_id

◆ js_fragment_proto_funcs

const JSCFunctionListEntry js_fragment_proto_funcs[]
static