mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +00:00
LibWeb: Implement CSSImportRule.supportsText
Returns the supports condition specified by the given import at-rule.
This commit is contained in:
parent
c37a47f76f
commit
5d57723ebf
Notes:
github-actions[bot]
2025-03-19 15:43:53 +00:00
Author: https://github.com/tcl3
Commit: 5d57723ebf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4001
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
7 changed files with 35 additions and 3 deletions
17
Tests/LibWeb/Text/input/css/CSSImportRule-supportsText.html
Normal file
17
Tests/LibWeb/Text/input/css/CSSImportRule-supportsText.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
@import url("https://something.invalid") supports(foo: bar);
|
||||
@import url("https://something.invalid") supports((display: block) and (foo: bar));
|
||||
</style>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
function printImportRule(importRule) {
|
||||
println(`cssText: ${importRule.cssText}`);
|
||||
println(`supportsText: ${importRule.supportsText}`);
|
||||
}
|
||||
|
||||
printImportRule(document.styleSheets[0].cssRules[0]);
|
||||
printImportRule(document.styleSheets[0].cssRules[1]);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue