diff --git a/src/browser/webapi/file/Blob.zig b/src/browser/webapi/Blob.zig similarity index 99% rename from src/browser/webapi/file/Blob.zig rename to src/browser/webapi/Blob.zig index c4e38725..5e2f2e9d 100644 --- a/src/browser/webapi/file/Blob.zig +++ b/src/browser/webapi/Blob.zig @@ -26,6 +26,7 @@ const Page = @import("../../Page.zig"); /// https://developer.mozilla.org/en-US/docs/Web/API/Blob const Blob = @This(); +_type: Type, /// Immutable slice of blob. /// Note that another blob may hold a pointer/slice to this, /// so its better to leave the deallocation of it to arena allocator. @@ -33,6 +34,11 @@ slice: []const u8, /// MIME attached to blob. Can be an empty string. mime: []const u8, +const Type = union(enum) { + generic, + file: *@import("File.zig"), +}; + const InitOptions = struct { /// MIME type. type: []const u8 = "",