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

LibWeb: Implement CSSStyleSheet.replace()

This method asynchronously replaces the content of the given stylesheet
with the content passed to it.

An exception is thrown if this method is used by a stylesheet not
created with the `CSSStyleSheet()` constructor.
This commit is contained in:
Tim Ledbetter 2024-02-24 07:46:59 +00:00 committed by Andreas Kling
parent d209d5a84f
commit 81c67d34eb
5 changed files with 118 additions and 3 deletions

View file

@ -13,7 +13,7 @@ interface CSSStyleSheet : StyleSheet {
unsigned long insertRule(CSSOMString rule, optional unsigned long index = 0);
undefined deleteRule(unsigned long index);
// FIXME: Promise<CSSStyleSheet> replace(USVString text);
Promise<CSSStyleSheet> replace(USVString text);
// FIXME: undefined replaceSync(USVString text);
// https://drafts.csswg.org/cssom/#legacy-css-style-sheet-members