mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
LibWeb: Include leading colons in KeyframeEffect::pseudo_element()
This commit is contained in:
parent
854d02fe10
commit
7bd62809a9
|
@ -736,6 +736,13 @@ void KeyframeEffect::set_target(DOM::Element* target)
|
|||
m_target_element = target;
|
||||
}
|
||||
|
||||
Optional<String> KeyframeEffect::pseudo_element() const
|
||||
{
|
||||
if (!m_target_pseudo_selector.has_value())
|
||||
return {};
|
||||
return MUST(String::formatted("::{}", m_target_pseudo_selector->name()));
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dom-keyframeeffect-pseudoelement
|
||||
WebIDL::ExceptionOr<void> KeyframeEffect::set_pseudo_element(Optional<String> pseudo_element)
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
void set_target(DOM::Element* target);
|
||||
|
||||
// JS bindings
|
||||
Optional<StringView> pseudo_element() const { return m_target_pseudo_selector->name(); }
|
||||
Optional<String> pseudo_element() const;
|
||||
WebIDL::ExceptionOr<void> set_pseudo_element(Optional<String>);
|
||||
|
||||
Optional<CSS::Selector::PseudoElement::Type> pseudo_element_type() const;
|
||||
|
|
Loading…
Reference in a new issue