refactor HTMLAnchorElement

Prefer new URL implementation with separate store for object data.
This commit is contained in:
Halil Durak
2025-10-17 19:39:10 +03:00
parent 8e7d8225ba
commit 146b56c8c0
4 changed files with 249 additions and 105 deletions

12
vendor/ada/root.zig vendored
View File

@@ -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);