mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-04 11:51:55 +03:00
use macro to compare
This commit is contained in:
parent
4fbeacf830
commit
71577f214d
@ -225,9 +225,6 @@ operation dispatchEvent %{
|
||||
*/
|
||||
|
||||
/* caution, this must match the struct generated from event.bnd */
|
||||
if (event == JSVAL_VOID) {
|
||||
jsret = JS_FALSE;
|
||||
} else {
|
||||
struct {
|
||||
dom_event *event;
|
||||
} *event_private;
|
||||
@ -249,13 +246,12 @@ operation dispatchEvent %{
|
||||
JS_GetProperty(cx, JSAPI_THIS_OBJECT(cx, vp), "onload", &eventval);
|
||||
}
|
||||
|
||||
if (eventval != JSVAL_VOID) {
|
||||
if (JSVAL_IS_VOID(eventval)) {
|
||||
event_argv[0] = eventval;
|
||||
jsret = JS_CallFunctionValue(cx, NULL, eventval, 1, event_argv, &event_rval);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
getter EventHandler %{
|
||||
|
Loading…
Reference in New Issue
Block a user