mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
add getHostname
This commit is contained in:
@@ -69,8 +69,9 @@ pub const URL = struct {
|
||||
return ada.getHref(self.internal);
|
||||
}
|
||||
|
||||
pub fn hostname(self: URL) []const u8 {
|
||||
return ada.getHostname(self.internal);
|
||||
pub fn getHostname(self: URL) []const u8 {
|
||||
const hostname = ada.getHostnameNullable(self.internal);
|
||||
return hostname.data[0..hostname.length];
|
||||
}
|
||||
|
||||
pub fn getFragment(self: URL) ?[]const u8 {
|
||||
|
||||
Reference in New Issue
Block a user