mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +00:00
LibWeb: Return undefined from event handler setters, not an empty value
This commit is contained in:
parent
a1a164e6b8
commit
1a7136b37a
1 changed files with 31 additions and 29 deletions
|
@ -705,12 +705,14 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::history_getter)
|
|||
} else if (value.is_string()) { \
|
||||
cpp_value.string = value.as_string().string(); \
|
||||
} else { \
|
||||
return {}; \
|
||||
return JS::js_undefined(); \
|
||||
} \
|
||||
(void)throw_dom_exception_if_needed(vm, global_object, [&] { \
|
||||
auto result = throw_dom_exception_if_needed(vm, global_object, [&] { \
|
||||
return impl->set_##attribute(cpp_value); \
|
||||
}); \
|
||||
if (should_return_empty(result)) \
|
||||
return {}; \
|
||||
return JS::js_undefined(); \
|
||||
}
|
||||
ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE)
|
||||
#undef __ENUMERATE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue