mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
refactor HTMLAnchorElement
Prefer new URL implementation with separate store for object data.
This commit is contained in:
12
vendor/ada/root.zig
vendored
12
vendor/ada/root.zig
vendored
@@ -71,12 +71,24 @@ pub inline fn getHrefNullable(url: URL) String {
|
||||
return c.ada_get_href(url);
|
||||
}
|
||||
|
||||
pub inline fn getUsernameNullable(url: URL) String {
|
||||
return c.ada_get_username(url);
|
||||
}
|
||||
|
||||
/// Can return an empty string.
|
||||
pub inline fn getUsername(url: URL) []const u8 {
|
||||
const username = c.ada_get_username(url);
|
||||
return username.data[0..username.length];
|
||||
}
|
||||
|
||||
pub inline fn getPasswordNullable(url: URL) String {
|
||||
return c.ada_get_password(url);
|
||||
}
|
||||
|
||||
pub inline fn getSearchNullable(url: URL) String {
|
||||
return c.ada_get_search(url);
|
||||
}
|
||||
|
||||
/// Can return an empty string.
|
||||
pub inline fn getPassword(url: URL) []const u8 {
|
||||
const password = c.ada_get_password(url);
|
||||
|
||||
Reference in New Issue
Block a user