mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
LibWeb: Implement CSSStyleSheet.addRule()
This is a legacy method that has been superseded by `insertRule()`, although it is supported by all modern browser engines.
This commit is contained in:
parent
87b52a1816
commit
3ea318ca8b
5 changed files with 68 additions and 1 deletions
9
Tests/LibWeb/Text/expected/css/CSSStyleSheet-addRule.txt
Normal file
9
Tests/LibWeb/Text/expected/css/CSSStyleSheet-addRule.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
addValue() return value: -1
|
||||
Rule count after calling addRule() with no arguments: 1
|
||||
Rule text: undefined { }
|
||||
Rule count after calling addRule with no index: 2
|
||||
Second rule text: .test { font-size: 14px; }
|
||||
Rule count after calling addRule with index 0: 3
|
||||
Rule text: .test { padding: 100px; }
|
||||
Exception thrown when given a negative index: IndexSizeError
|
||||
Exception thrown when index out of range: IndexSizeError
|
Loading…
Add table
Add a link
Reference in a new issue