diff --git a/src/browser/ScriptManager.zig b/src/browser/ScriptManager.zig index ff6694f4..737b88f0 100644 --- a/src/browser/ScriptManager.zig +++ b/src/browser/ScriptManager.zig @@ -143,32 +143,7 @@ pub fn addFromElement(self: *ScriptManager, element: *parser.Element) !void { return; }; - var onload: ?Script.Callback = null; - var onerror: ?Script.Callback = null; - const page = self.page; - if (page.getNodeState(@ptrCast(element))) |se| { - // if the script has a node state, then it was dynamically added and thus - // the onload/onerror were saved in the state (if there are any) - if (se.onload) |function| { - onload = .{ .function = function }; - } - if (se.onerror) |function| { - onerror = .{ .function = function }; - } - } else { - // if the script has no node state, then it could still be dynamically - // added (could have been dynamically added, but no attributes were set - // which required a node state to be created) or it could be a inline - //