Merge pull request #640 from lightpanda-io/script_nomodule

Don't load script tags with the nomodule attribute
This commit is contained in:
Karl Seguin
2025-05-14 18:30:26 +08:00
committed by GitHub

View File

@@ -759,6 +759,12 @@ pub const Page = struct {
return null;
}
if (try parser.elementGetAttribute(e, "nomodule") != null) {
// these scripts should only be loaded if we don't support modules
// but since we do support modules, we can just skip them.
return null;
}
const kind = parseKind(try parser.elementGetAttribute(e, "type")) orelse {
return null;
};