1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

LibWeb: Add CSSStyleSheet.{insert,delete,remove}Rule() APIs

Note that insertRule() is really just a big TODO right now.
This commit is contained in:
Andreas Kling 2021-09-29 20:28:32 +02:00
parent 3a4565beec
commit 30d710a0a2
5 changed files with 73 additions and 2 deletions

View file

@ -36,6 +36,10 @@ public:
CSSRuleList* css_rules() { return m_rules; }
CSSRuleList const* css_rules() const { return m_rules; }
DOM::ExceptionOr<unsigned> insert_rule(StringView rule, unsigned index);
DOM::ExceptionOr<void> remove_rule(unsigned index);
DOM::ExceptionOr<void> delete_rule(unsigned index);
template<typename Callback>
void for_each_effective_style_rule(Callback callback) const
{