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