mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Implement CSSStyleSheet.replaceSync()
This method behaves the same as `CSSStyleSheet.replace()` but the operation is performed synchronously.
This commit is contained in:
committed by
Andreas Kling
parent
81c67d34eb
commit
87b52a1816
Notes:
sideshowbarker
2024-07-18 02:13:10 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/87b52a1816 Pull-request: https://github.com/SerenityOS/serenity/pull/23327 Reviewed-by: https://github.com/awesomekling
@@ -0,0 +1,8 @@
|
||||
Exception thrown when calling replaceSync() on non-constructed stylesheet: NotAllowedError
|
||||
Number of CSS rules after replaceSync(): 2
|
||||
Rule: .test { font-size: 14px; }
|
||||
Rule: .test2 { font-size: 16px; }
|
||||
cssRules returns the same object before and after replaceSync(): true
|
||||
@import rule should be not appear below:
|
||||
Rule: .test { padding: 100px; }
|
||||
Calling replaceSync() while the disallow modification flag set throws: NotAllowedError
|
||||
Reference in New Issue
Block a user