use node.firstChild() directly per review feedback

node is already available in scope — no need to traverse back through
script.asConstElement().asConstNode().
This commit is contained in:
egrs
2026-03-09 08:31:54 +01:00
parent ec9a2d8155
commit 245a92a644

View File

@@ -2911,7 +2911,7 @@ fn nodeIsReady(self: *Page, comptime from_parser: bool, node: *Node) !void {
// Script was added via JavaScript without a src attribute.
// Only skip if it has no inline content either — scripts with
// textContent/text should still execute per spec.
if (script.asConstElement().asConstNode().firstChild() == null) {
if (node.firstChild() == null) {
return;
}
}