mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-15 07:48:58 +00:00
browser: remove useless switch
This commit is contained in:
@@ -225,8 +225,10 @@ pub const Page = struct {
|
||||
|
||||
const e = parser.nodeToElement(next.?);
|
||||
const tag = try parser.elementHTMLGetTagType(@as(*parser.ElementHTML, @ptrCast(e)));
|
||||
switch (tag) {
|
||||
.script => {
|
||||
|
||||
// ignore non-script tags
|
||||
if (tag != .script) continue;
|
||||
|
||||
// ignore non-js script.
|
||||
// > type
|
||||
// > Attribute is not set (default), an empty string, or a JavaScript MIME
|
||||
@@ -274,9 +276,6 @@ pub const Page = struct {
|
||||
// > page.
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes
|
||||
self.evalScript(e) catch |err| log.warn("evaljs: {any}", .{err});
|
||||
},
|
||||
else => continue,
|
||||
}
|
||||
}
|
||||
|
||||
// TODO wait for deferred scripts
|
||||
|
||||
Reference in New Issue
Block a user