mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 03:57:35 +00:00
LibJS: Replace boolean without_side_effects parameters with an enum
This commit is contained in:
parent
864beb0bd5
commit
dcb55db99b
16 changed files with 56 additions and 51 deletions
|
@ -12,21 +12,21 @@
|
|||
|
||||
namespace Web::Bindings {
|
||||
|
||||
JS::Value HTMLCollectionWrapper::get(JS::PropertyName const& name, JS::Value receiver, bool without_side_effects) const
|
||||
JS::Value HTMLCollectionWrapper::get(JS::PropertyName const& name, JS::Value receiver, JS::AllowSideEffects allow_side_effects) const
|
||||
{
|
||||
if (!name.is_string())
|
||||
return Base::get(name, receiver, without_side_effects);
|
||||
return Base::get(name, receiver, allow_side_effects);
|
||||
auto* item = const_cast<DOM::HTMLCollection&>(impl()).named_item(name.to_string());
|
||||
if (!item)
|
||||
return Base::get(name, receiver, without_side_effects);
|
||||
return Base::get(name, receiver, allow_side_effects);
|
||||
return JS::Value { wrap(global_object(), *item) };
|
||||
}
|
||||
|
||||
JS::Value HTMLCollectionWrapper::get_by_index(u32 property_index, bool without_side_effects) const
|
||||
JS::Value HTMLCollectionWrapper::get_by_index(u32 property_index, JS::AllowSideEffects allow_side_effects) const
|
||||
{
|
||||
auto* item = const_cast<DOM::HTMLCollection&>(impl()).item(property_index);
|
||||
if (!item)
|
||||
return Base::get_by_index(property_index, without_side_effects);
|
||||
return Base::get_by_index(property_index, allow_side_effects);
|
||||
return wrap(global_object(), *item);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue