Skip to content

Commit 7d51da1

Browse files
Merge pull request #974 from lightpanda-io/ignore_non_js_script_tags
Removes the log for unknown script tags
2 parents ccc9618 + 5fa8567 commit 7d51da1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/browser/ScriptManager.zig

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,10 @@ pub fn addFromElement(self: *ScriptManager, element: *parser.Element) !void {
136136
if (std.ascii.eqlIgnoreCase(script_type, "module")) {
137137
break :blk .module;
138138
}
139-
if (std.ascii.eqlIgnoreCase(script_type, "application/json")) {
140-
return;
141-
}
142-
if (std.ascii.eqlIgnoreCase(script_type, "application/ld+json")) {
143-
return;
144-
}
145139

146-
log.warn(.user_script, "unknown script type", .{ .type = script_type });
140+
// "type" could be anything, but only the above are ones we need to process.
141+
// Common other ones are application/json, application/ld+json, text/template
142+
147143
return;
148144
};
149145

0 commit comments

Comments
 (0)