Rename Stylesheet::Type_ to Stylesheet::Type (#37126)

I'm not sure if `CodegenRust.py` was supposed to remove the underscore,
but we end up exposing `type_` to javascript which is obviously wrong.
There's no need to rename the method in the first place, because `Type`
(with a capital T) is not a rust keyword.

Testing: Covered by existing web platform tests

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-25 19:36:16 +02:00 committed by GitHub
parent 70a2ea3a66
commit 41ecfb53a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 9 deletions

View file

@ -39,8 +39,8 @@ impl StyleSheet {
}
impl StyleSheetMethods<crate::DomTypeHolder> for StyleSheet {
// https://drafts.csswg.org/cssom/#dom-stylesheet-type
fn Type_(&self) -> DOMString {
/// <https://drafts.csswg.org/cssom/#dom-stylesheet-type>
fn Type(&self) -> DOMString {
self.type_.clone()
}