mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
Compare commits
2 Commits
28ec8d4b94
...
55e9d8d166
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e9d8d166 | ||
|
|
d7d2f84794 |
@@ -268,9 +268,7 @@ pub const TraverseToOptions = struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub fn _traverseTo(self: *Navigation, key: []const u8, _opts: ?TraverseToOptions, page: *Page) !NavigationReturn {
|
pub fn _traverseTo(self: *Navigation, key: []const u8, _opts: ?TraverseToOptions, page: *Page) !NavigationReturn {
|
||||||
if (_opts != null) {
|
log.debug(.browser, "not implemented", .{ .options = _opts });
|
||||||
log.debug(.browser, "not implemented", .{ .options = _opts });
|
|
||||||
}
|
|
||||||
|
|
||||||
for (self.entries.items, 0..) |entry, i| {
|
for (self.entries.items, 0..) |entry, i| {
|
||||||
if (std.mem.eql(u8, key, entry.key)) {
|
if (std.mem.eql(u8, key, entry.key)) {
|
||||||
|
|||||||
@@ -52,7 +52,5 @@ pub fn set_oncurrententrychange(self: *NavigationEventTarget, listener: ?EventHa
|
|||||||
if (self.oncurrententrychange_cbk) |cbk| try self.unregister("currententrychange", cbk.id);
|
if (self.oncurrententrychange_cbk) |cbk| try self.unregister("currententrychange", cbk.id);
|
||||||
if (listener) |listen| {
|
if (listener) |listen| {
|
||||||
self.oncurrententrychange_cbk = try self.register(page.arena, "currententrychange", listen);
|
self.oncurrententrychange_cbk = try self.register(page.arena, "currententrychange", listen);
|
||||||
} else {
|
|
||||||
self.oncurrententrychange_cbk = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ pub const NavigationHistoryEntry = struct {
|
|||||||
pub fn get_sameDocument(self: *const NavigationHistoryEntry, page: *Page) !bool {
|
pub fn get_sameDocument(self: *const NavigationHistoryEntry, page: *Page) !bool {
|
||||||
const _url = self.url orelse return false;
|
const _url = self.url orelse return false;
|
||||||
const url = try URL.parse(_url, null);
|
const url = try URL.parse(_url, null);
|
||||||
return page.url.eqlDocument(&url, page.call_arena);
|
return page.url.eqlDocument(&url, page.arena);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_url(self: *const NavigationHistoryEntry) ?[]const u8 {
|
pub fn get_url(self: *const NavigationHistoryEntry) ?[]const u8 {
|
||||||
|
|||||||
Reference in New Issue
Block a user