0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-09-21 19:46:23 -04:00

[quickjs] Test commit. window.alert('Blabla') works.

This commit is contained in:
Witold Filipczyk
2021-10-17 18:17:48 +02:00
parent d66fe4a8df
commit dc12c13244
22 changed files with 773 additions and 62 deletions

View File

@@ -9,9 +9,11 @@
#include "config.h"
#endif
#ifdef CONFIG_ECMASCRIPT
#ifdef CONFIG_ECMASCRIPT_SMJS
#include <jsapi.h>
#endif
#ifdef CONFIG_ECMASCRIPT
#include "main/module.h"
#include "util/time.h"
@@ -70,7 +72,9 @@ struct ecmascript_interpreter {
void *ac2;
void *document_obj;
void *location_obj;
#ifdef CONFIG_ECMASCRIPT_SMJS
JS::RootedValue fun;
#endif
bool changed;
};
@@ -113,7 +117,9 @@ void ecmascript_set_action(char **action, char *string);
void ecmascript_set_timeout(struct ecmascript_interpreter *interpreter, char *code, int timeout);
#ifdef CONFIG_ECMASCRIPT_SMJS
void ecmascript_set_timeout2(struct ecmascript_interpreter *interpreter, JS::HandleValue f, int timeout);
#endif
int get_ecmascript_enable(struct ecmascript_interpreter *interpreter);
@@ -121,6 +127,9 @@ void check_for_rerender(struct ecmascript_interpreter *interpreter, const char*
void toggle_ecmascript(struct session *ses);
void *document_parse(struct document *document);
void free_document(void *doc);
extern char *console_error_filename;
extern char *console_log_filename;