mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
LibWeb: Include leading colons in KeyframeEffect::pseudo_element()
This commit is contained in:
parent
854d02fe10
commit
7bd62809a9
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/7bd62809a9 Pull-request: https://github.com/SerenityOS/serenity/pull/24474
|
@ -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