mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:58:11 +00:00
LibJS: Rename PropertyName to PropertyKey
Let's use the same name as the spec. :^)
This commit is contained in:
parent
715e7fada8
commit
398c181c79
55 changed files with 287 additions and 287 deletions
|
@ -21,14 +21,14 @@ static CSS::PropertyID property_id_from_name(StringView name)
|
|||
return CSS::PropertyID::Invalid;
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<bool> CSSStyleDeclarationWrapper::internal_has_property(JS::PropertyName const& name) const
|
||||
JS::ThrowCompletionOr<bool> CSSStyleDeclarationWrapper::internal_has_property(JS::PropertyKey const& name) const
|
||||
{
|
||||
if (!name.is_string())
|
||||
return Base::internal_has_property(name);
|
||||
return property_id_from_name(name.to_string()) != CSS::PropertyID::Invalid;
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<JS::Value> CSSStyleDeclarationWrapper::internal_get(JS::PropertyName const& name, JS::Value receiver) const
|
||||
JS::ThrowCompletionOr<JS::Value> CSSStyleDeclarationWrapper::internal_get(JS::PropertyKey const& name, JS::Value receiver) const
|
||||
{
|
||||
if (!name.is_string())
|
||||
return Base::internal_get(name, receiver);
|
||||
|
@ -40,7 +40,7 @@ JS::ThrowCompletionOr<JS::Value> CSSStyleDeclarationWrapper::internal_get(JS::Pr
|
|||
return { js_string(vm(), String::empty()) };
|
||||
}
|
||||
|
||||
JS::ThrowCompletionOr<bool> CSSStyleDeclarationWrapper::internal_set(JS::PropertyName const& name, JS::Value value, JS::Value receiver)
|
||||
JS::ThrowCompletionOr<bool> CSSStyleDeclarationWrapper::internal_set(JS::PropertyKey const& name, JS::Value value, JS::Value receiver)
|
||||
{
|
||||
if (!name.is_string())
|
||||
return Base::internal_set(name, value, receiver);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue