mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibWeb: Add a CustomHasProperty trait to WrapperGenerator
We immediately use this in CSSStyleDeclaration to fix that "background" in element.style did not return true. This is the mechanism used in css3test.com for detecting support of features.
This commit is contained in:
parent
0b74cc4712
commit
e42eaa5d95
3 changed files with 14 additions and 1 deletions
|
@ -11,6 +11,13 @@
|
|||
|
||||
namespace Web::Bindings {
|
||||
|
||||
bool CSSStyleDeclarationWrapper::internal_has_property(JS::PropertyName const& name) const
|
||||
{
|
||||
// FIXME: These should actually use camelCase versions of the property names!
|
||||
auto property_id = CSS::property_id_from_string(name.to_string());
|
||||
return property_id != CSS::PropertyID::Invalid;
|
||||
}
|
||||
|
||||
JS::Value CSSStyleDeclarationWrapper::internal_get(const JS::PropertyName& name, JS::Value receiver) const
|
||||
{
|
||||
// FIXME: These should actually use camelCase versions of the property names!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue