LibWeb: Update stylesheet media value when changing link media attribute

This commit is contained in:
Colin Reeder 2024-08-10 18:07:02 -06:00 committed by Andreas Kling
commit 00f75648e5
Notes: github-actions[bot] 2024-08-13 12:13:49 +00:00
5 changed files with 38 additions and 0 deletions

View file

@ -187,6 +187,10 @@ void HTMLLinkElement::attribute_changed(FlyString const& name, Optional<String>
)) {
fetch_and_process_linked_resource();
}
if (name == HTML::AttributeNames::media && m_loaded_style_sheet) {
m_loaded_style_sheet->set_media(value.value_or(String {}));
}
}
}