Fix type attribute for module script not in case insensitive issue (#30206)

* fix(htmlscriptelement): Make sure type for module is in case insensitive

* fix(htmlscripthtml): Remove related .ini file since the tests are passed
This commit is contained in:
Li-Hsuan Hsieh 2023-08-26 02:28:51 +08:00 committed by GitHub
parent 88208024c6
commit 42c705b4ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 15 deletions

View file

@ -1186,7 +1186,9 @@ impl HTMLScriptElement {
(Some(ref ty), _) => {
debug!("script type={}", &***ty);
if &***ty == String::from("module") {
if ty.to_ascii_lowercase().trim_matches(HTML_SPACE_CHARACTERS) ==
String::from("module")
{
return Some(ScriptType::Module);
}