1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[quickjs] libdom document.c

Many TODOs
This commit is contained in:
Witold Filipczyk 2023-04-03 18:04:30 +02:00
parent adff92389f
commit 457b383c1e
8 changed files with 1824 additions and 2 deletions

View File

@ -1,6 +1,6 @@
top_builddir=../../../..
include $(top_builddir)/Makefile.config
OBJS = attr.o attributes.o collection.o console.o element.o form.o forms.o heartbeat.o history.o input.o keyboard.o localstorage.o location.o mapa.obj message.o navigator.o nodelist.o screen.o unibar.o window.o xhr.o
OBJS = attr.o attributes.o collection.o console.o document.o element.o form.o forms.o heartbeat.o history.o input.o keyboard.o localstorage.o location.o mapa.obj message.o navigator.o nodelist.o screen.o unibar.o window.o xhr.o
include $(top_srcdir)/Makefile.lib

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,14 @@ attr_create_new_collections_map(void)
return (void *)mapa;
}
void *
attr_create_new_doctypes_map(void)
{
std::map<void *, JSValueConst> *mapa = new std::map<void *, JSValueConst>;
return (void *)mapa;
}
void *
attr_create_new_elements_map(void)
{

View File

@ -17,6 +17,7 @@ void *attr_create_new_attributes_map(void);
void *attr_create_new_attributes_map_rev(void);
void *attr_create_new_collections_map(void);
void *attr_create_new_collections_map_rev(void);
void *attr_create_new_doctypes_map(void);
void *attr_create_new_elements_map(void);
void *attr_create_new_privates_map_void(void);
void *attr_create_new_form_elements_map(void);

View File

@ -1,2 +1,2 @@
srcs += files('attr.c', 'attributes.c', 'collection.c', 'console.c', 'element.c', 'form.c', 'forms.c', 'heartbeat.c', 'history.c', 'input.c', 'keyboard.c', 'localstorage.c', 'location.c',
srcs += files('attr.c', 'attributes.c', 'collection.c', 'console.c', 'document.c', 'element.c', 'form.c', 'forms.c', 'heartbeat.c', 'history.c', 'input.c', 'keyboard.c', 'localstorage.c', 'location.c',
'mapa.cpp', 'message.c', 'navigator.c', 'nodelist.c', 'screen.c', 'unibar.c', 'window.c', 'xhr.c')

View File

@ -61,6 +61,8 @@
#include <map>
#include <iostream>
#ifndef CONFIG_LIBDOM
#define countof(x) (sizeof(x) / sizeof((x)[0]))
static xmlpp::Document emptyDoc;
@ -1840,3 +1842,4 @@ getDocument(JSContext *ctx, void *doc)
RETURN_JS(document_obj);
}
#endif

View File

@ -3,7 +3,15 @@
#include <quickjs/quickjs.h>
#ifdef __cplusplus
extern "C" {
#endif
JSValue getDocument(JSContext *ctx, void *doc);
JSValue js_document_init(JSContext *ctx);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -3,8 +3,16 @@
#include <quickjs/quickjs.h>
#ifdef __cplusplus
extern "C" {
#endif
JSValue getImplementation(JSContext *ctx);
#ifdef __cplusplus
}
#endif
#endif