mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[quickjs] arithmetics.html usable again
This commit is contained in:
parent
9f3d9dcef3
commit
ad050ea68a
@ -169,10 +169,10 @@ quickjs_get_interpreter(struct ecmascript_interpreter *interpreter)
|
||||
js_unibar_init(ctx, global_obj);
|
||||
js_navigator_init(ctx, global_obj);
|
||||
js_history_init(ctx, global_obj);
|
||||
js_location_init(ctx, global_obj);
|
||||
js_console_init(ctx, global_obj);
|
||||
js_localstorage_init(ctx, global_obj);
|
||||
interpreter->document_obj = js_document_init(ctx, global_obj);
|
||||
interpreter->location_obj = js_location_init(ctx, global_obj);
|
||||
|
||||
JS_FreeValue(ctx, global_obj);
|
||||
|
||||
|
@ -1560,7 +1560,7 @@ static const JSCFunctionListEntry js_document_proto_funcs[] = {
|
||||
JS_CFUNC_DEF("createTextNode", 1, js_document_createTextNode),
|
||||
JS_CFUNC_DEF("write", 1, js_document_write),
|
||||
JS_CFUNC_DEF("writeln", 1, js_document_writeln),
|
||||
JS_CFUNC_DEF("replace", 1, js_document_replace),
|
||||
JS_CFUNC_DEF("replace", 2, js_document_replace),
|
||||
JS_CFUNC_DEF("getElementById", 1, js_document_getElementById),
|
||||
JS_CFUNC_DEF("getElementsByClassName", 1, js_document_getElementsByClassName),
|
||||
JS_CFUNC_DEF("getElementsByName", 1, js_document_getElementsByName),
|
||||
|
@ -620,7 +620,7 @@ fail:
|
||||
return JS_EXCEPTION;
|
||||
}
|
||||
|
||||
int
|
||||
JSValue
|
||||
js_location_init(JSContext *ctx, JSValue global_obj)
|
||||
{
|
||||
JSValue location_proto, location_class;
|
||||
@ -638,5 +638,5 @@ js_location_init(JSContext *ctx, JSValue global_obj)
|
||||
JS_SetClassProto(ctx, js_location_class_id, location_proto);
|
||||
|
||||
JS_SetPropertyStr(ctx, global_obj, "location", location_proto);
|
||||
return 0;
|
||||
return location_proto;
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
#include <quickjs/quickjs.h>
|
||||
|
||||
int js_location_init(JSContext *ctx, JSValue global_obj);
|
||||
JSValue js_location_init(JSContext *ctx, JSValue global_obj);
|
||||
|
||||
#endif
|
||||
|
@ -1282,7 +1282,7 @@ const spidermonkeyFunctionSpec document_funcs[] = {
|
||||
{ "createTextNode", document_createTextNode, 1 },
|
||||
{ "write", document_write, 1 },
|
||||
{ "writeln", document_writeln, 1 },
|
||||
{ "replace", document_replace, 1 },
|
||||
{ "replace", document_replace, 2 },
|
||||
{ "getElementById", document_getElementById, 1 },
|
||||
{ "getElementsByClassName", document_getElementsByClassName, 1 },
|
||||
{ "getElementsByName", document_getElementsByName, 1 },
|
||||
|
Loading…
Reference in New Issue
Block a user