mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 14:43:28 +00:00
fix NavigationCurrentEntryChange Constructor
This commit is contained in:
@@ -38,7 +38,7 @@ pub const Location = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_href(_: *const Location, href: []const u8, page: *Page) !void {
|
pub fn set_href(_: *const Location, href: []const u8, page: *Page) !void {
|
||||||
return page.navigateFromWebAPI(href, .{ .reason = .script });
|
return page.navigateFromWebAPI(href, .{ .reason = .script }, .{ .push = null });
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_protocol(self: *Location) []const u8 {
|
pub fn get_protocol(self: *Location) []const u8 {
|
||||||
@@ -73,10 +73,6 @@ pub const Location = struct {
|
|||||||
return self.url.get_origin(page);
|
return self.url.get_origin(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_href(_: *Location, url: []const u8, page: *Page) !void {
|
|
||||||
return page.navigateFromWebAPI(url, .{ .reason = .script }, .{ .push = null });
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn _assign(_: *const Location, url: []const u8, page: *Page) !void {
|
pub fn _assign(_: *const Location, url: []const u8, page: *Page) !void {
|
||||||
return page.navigateFromWebAPI(url, .{ .reason = .script }, .{ .push = null });
|
return page.navigateFromWebAPI(url, .{ .reason = .script }, .{ .push = null });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
|
|||||||
|
|
||||||
pub const EventInit = struct {
|
pub const EventInit = struct {
|
||||||
from: *NavigationHistoryEntry,
|
from: *NavigationHistoryEntry,
|
||||||
navigation_type: ?NavigationType = null,
|
navigationType: ?NavigationType = null,
|
||||||
};
|
};
|
||||||
|
|
||||||
proto: parser.Event,
|
proto: parser.Event,
|
||||||
@@ -164,7 +164,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
|
|||||||
return .{
|
return .{
|
||||||
.proto = event.*,
|
.proto = event.*,
|
||||||
.from = opts.from,
|
.from = opts.from,
|
||||||
.navigation_type = opts.navigation_type,
|
.navigation_type = opts.navigationType,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ pub const NavigationCurrentEntryChangeEvent = struct {
|
|||||||
|
|
||||||
var evt = NavigationCurrentEntryChangeEvent.constructor(
|
var evt = NavigationCurrentEntryChangeEvent.constructor(
|
||||||
"currententrychange",
|
"currententrychange",
|
||||||
.{ .from = from, .navigation_type = typ },
|
.{ .from = from, .navigationType = typ },
|
||||||
) catch |err| {
|
) catch |err| {
|
||||||
log.err(.app, "event constructor error", .{
|
log.err(.app, "event constructor error", .{
|
||||||
.err = err,
|
.err = err,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const Http = @import("../http/Http.zig");
|
|||||||
const ScriptManager = @import("ScriptManager.zig");
|
const ScriptManager = @import("ScriptManager.zig");
|
||||||
const SlotChangeMonitor = @import("SlotChangeMonitor.zig");
|
const SlotChangeMonitor = @import("SlotChangeMonitor.zig");
|
||||||
const HTMLDocument = @import("html/document.zig").HTMLDocument;
|
const HTMLDocument = @import("html/document.zig").HTMLDocument;
|
||||||
const NavigationKind = @import("html/Navigation.zig").NavigationKind;
|
const NavigationKind = @import("navigation/navigation.zig").NavigationKind;
|
||||||
|
|
||||||
const js = @import("js/js.zig");
|
const js = @import("js/js.zig");
|
||||||
const URL = @import("../url.zig").URL;
|
const URL = @import("../url.zig").URL;
|
||||||
|
|||||||
Reference in New Issue
Block a user