diff --git a/NEWS b/NEWS index 7ee6608d..328a02a3 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,9 @@ Bugs that should be removed from NEWS before the 0.12.0 release: was the first release that had these bugs. * bug 1033: Fix memory leak in ECMAScript window.open. ELinks 0.12pre1 was the first release that had this bug. +* Global ECMAScript functions alert, open, and setTimeout again work + with SEE. ELinks 0.12pre1 was the first release that supported SEE + at all. ELinks 0.12pre1: ---------------- diff --git a/src/ecmascript/see/window.c b/src/ecmascript/see/window.c index 513b962e..5df35c7d 100644 --- a/src/ecmascript/see/window.c +++ b/src/ecmascript/see/window.c @@ -211,7 +211,9 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self, struct view_state *vs = win->vs; unsigned char *string; - see_check_class(interp, thisobj, &js_window_object_class); + /* Do not check thisobj->objectclass. ELinks sets this + * function as a property of both the window object and the + * global object, so thisobj may validly refer to either. */ SEE_SET_BOOLEAN(res, 1); if (argc < 1) @@ -248,7 +250,9 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self, static int ratelimit_count; #endif - see_check_class(interp, thisobj, &js_window_object_class); + /* Do not check thisobj->objectclass. ELinks sets this + * function as a property of both the window object and the + * global object, so thisobj may validly refer to either. */ SEE_SET_OBJECT(res, (struct SEE_object *)win); if (get_opt_bool("ecmascript.block_window_opening")) { @@ -342,7 +346,9 @@ js_setTimeout(struct SEE_interpreter *interp, struct SEE_object *self, unsigned char *code; int timeout; - see_check_class(interp, thisobj, &js_window_object_class); + /* Do not check thisobj->objectclass. ELinks sets this + * function as a property of both the window object and the + * global object, so thisobj may validly refer to either. */ if (argc != 2) return; ei = ((struct global_object *)interp)->interpreter;