mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 15:58:56 +00:00
LibWeb: Add CSSStyleSheet.ownerRule
attribute
This returns the `CSSImportRule` corresponding to the `@import` at-rule that imported the stylesheet into the document. If the stylesheet wasn't imported then this property is null.
This commit is contained in:
parent
588a031e2d
commit
9b1ea4e2fc
Notes:
sideshowbarker
2024-07-16 23:03:06 +09:00
Author: https://github.com/tcl3
Commit: 9b1ea4e2fc
Pull-request: https://github.com/SerenityOS/serenity/pull/23327
Reviewed-by: https://github.com/awesomekling
3 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2024, Tim Ledbetter <timledbetter@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -28,6 +29,8 @@ public:
|
|||
|
||||
virtual ~CSSStyleSheet() override = default;
|
||||
|
||||
JS::GCPtr<CSSRule const> owner_rule() const { return m_owner_css_rule; }
|
||||
JS::GCPtr<CSSRule> owner_rule() { return m_owner_css_rule; }
|
||||
void set_owner_css_rule(CSSRule* rule) { m_owner_css_rule = rule; }
|
||||
|
||||
virtual String type() const override { return "text/css"_string; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue