/* Base ECMAScript file. Mostly a proxy for specific library backends. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "elinks.h" #include "config/options.h" #include "document/document.h" #include "document/view.h" #include "ecmascript/ecmascript.h" #include "ecmascript/spidermonkey.h" #include "intl/gettext/libintl.h" #include "main/module.h" #include "main/timer.h" #include "osdep/osdep.h" #include "protocol/protocol.h" #include "protocol/uri.h" #include "session/session.h" #include "session/task.h" #include "terminal/terminal.h" #include "terminal/window.h" #include "util/conv.h" #include "util/string.h" #include "viewer/text/view.h" /* current_frame() */ #include "viewer/text/form.h" /* <-ecmascript_reset_state() */ #include "viewer/text/vs.h" /* TODO: We should have some kind of ACL for the scripts - i.e. ability to * disallow the scripts to open new windows (or so that the windows are always * directed to tabs, this particular option would be a tristate), disallow * messing with your menubar/statusbar visibility, disallow changing the * statusbar content etc. --pasky */ static union option_info ecmascript_options[] = { INIT_OPT_TREE("", N_("ECMAScript"), "ecmascript", 0, N_("ECMAScript options.")), INIT_OPT_BOOL("ecmascript", N_("Enable"), "enable", 0, 0, N_("Whether to run those scripts inside of documents.")), INIT_OPT_BOOL("ecmascript", N_("Script error reporting"), "error_reporting", 0, 0, N_("Open a message box when a script reports an error.")), INIT_OPT_BOOL("ecmascript", N_("Ignore