Skip to content

Commit 7280e4c

Browse files
committed
fix NavigationCurrentEntryChange Constructor
1 parent 99a07a6 commit 7280e4c

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/browser/html/location.zig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub const Location = struct {
3838
}
3939

4040
pub fn set_href(_: *const Location, href: []const u8, page: *Page) !void {
41-
return page.navigateFromWebAPI(href, .{ .reason = .script });
41+
return page.navigateFromWebAPI(href, .{ .reason = .script }, .{ .push = null });
4242
}
4343

4444
pub fn get_protocol(self: *Location) []const u8 {
@@ -73,10 +73,6 @@ pub const Location = struct {
7373
return self.url.get_origin(page);
7474
}
7575

76-
pub fn set_href(_: *Location, url: []const u8, page: *Page) !void {
77-
return page.navigateFromWebAPI(url, .{ .reason = .script }, .{ .push = null });
78-
}
79-
8076
pub fn _assign(_: *const Location, url: []const u8, page: *Page) !void {
8177
return page.navigateFromWebAPI(url, .{ .reason = .script }, .{ .push = null });
8278
}

src/browser/navigation/navigation.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
147147

148148
pub const EventInit = struct {
149149
from: *NavigationHistoryEntry,
150-
navigation_type: ?NavigationType = null,
150+
navigationType: ?NavigationType = null,
151151
};
152152

153153
proto: parser.Event,
@@ -164,7 +164,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
164164
return .{
165165
.proto = event.*,
166166
.from = opts.from,
167-
.navigation_type = opts.navigation_type,
167+
.navigation_type = opts.navigationType,
168168
};
169169
}
170170

@@ -184,7 +184,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
184184

185185
var evt = NavigationCurrentEntryChangeEvent.constructor(
186186
"currententrychange",
187-
.{ .from = from, .navigation_type = typ },
187+
.{ .from = from, .navigationType = typ },
188188
) catch |err| {
189189
log.err(.app, "event constructor error", .{
190190
.err = err,

src/browser/page.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Http = @import("../http/Http.zig");
3434
const ScriptManager = @import("ScriptManager.zig");
3535
const SlotChangeMonitor = @import("SlotChangeMonitor.zig");
3636
const HTMLDocument = @import("html/document.zig").HTMLDocument;
37-
const NavigationKind = @import("html/Navigation.zig").NavigationKind;
37+
const NavigationKind = @import("navigation/navigation.zig").NavigationKind;
3838

3939
const js = @import("js/js.zig");
4040
const URL = @import("../url.zig").URL;

0 commit comments

Comments
 (0)