browser: script with type text/javascript are js

This commit is contained in:
Pierre Tachoire
2025-04-07 22:06:39 +02:00
parent 309d70c142
commit ad0117e060

View File

@@ -723,6 +723,7 @@ pub const Page = struct {
fn parseKind(stype: ?[]const u8) Kind {
if (stype == null or stype.?.len == 0) return .javascript;
if (std.mem.eql(u8, stype.?, "application/javascript")) return .javascript;
if (std.mem.eql(u8, stype.?, "text/javascript")) return .javascript;
if (std.mem.eql(u8, stype.?, "module")) return .module;
return .unknown;