mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
prefer get prefix in getter accessors
This commit is contained in:
@@ -262,12 +262,12 @@ pub fn getSlice(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the size of the Blob in bytes.
|
/// Returns the size of the Blob in bytes.
|
||||||
pub fn size(self: *const Blob) usize {
|
pub fn getSize(self: *const Blob) usize {
|
||||||
return self.slice.len;
|
return self.slice.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the type of Blob; likely a MIME type, yet anything can be given.
|
/// Returns the type of Blob; likely a MIME type, yet anything can be given.
|
||||||
pub fn @"type"(self: *const Blob) []const u8 {
|
pub fn getType(self: *const Blob) []const u8 {
|
||||||
return self.mime;
|
return self.mime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,8 +284,8 @@ pub const JsApi = struct {
|
|||||||
pub const text = bridge.function(Blob.text, .{});
|
pub const text = bridge.function(Blob.text, .{});
|
||||||
pub const bytes = bridge.function(Blob.bytes, .{});
|
pub const bytes = bridge.function(Blob.bytes, .{});
|
||||||
pub const slice = bridge.function(Blob.getSlice, .{});
|
pub const slice = bridge.function(Blob.getSlice, .{});
|
||||||
pub const size = bridge.accessor(Blob.size, null, .{});
|
pub const size = bridge.accessor(Blob.getSize, null, .{});
|
||||||
pub const @"type" = bridge.accessor(Blob.type, null, .{});
|
pub const @"type" = bridge.accessor(Blob.getType, null, .{});
|
||||||
};
|
};
|
||||||
|
|
||||||
const testing = @import("../../../testing.zig");
|
const testing = @import("../../../testing.zig");
|
||||||
|
|||||||
Reference in New Issue
Block a user