From 61357ee7e0e2399984a06cc7ea0bcce5fada0f14 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Thu, 2 May 2024 15:21:21 +0200 Subject: [PATCH] storage: update comment about dispatch event --- src/storage/storage.zig | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/storage/storage.zig b/src/storage/storage.zig index c04d50b0..b322645a 100644 --- a/src/storage/storage.zig +++ b/src/storage/storage.zig @@ -147,27 +147,45 @@ pub const Bottle = struct { return DOMError.QuotaExceeded; }; - // TODO dispatch event // > Broadcast this with key, oldValue, and value. // https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface + // + // > The storage event of the Window interface fires when a storage + // > area (localStorage or sessionStorage) has been modified in the + // > context of another document. + // https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event + // + // So for now, we won't impement the feature. } pub fn _removeItem(self: *Bottle, k: []const u8) !void { const old = self.map.fetchRemove(k); if (old == null) return; - // TODO dispatch event // > Broadcast this with key, oldValue, and null. // https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface + // + // > The storage event of the Window interface fires when a storage + // > area (localStorage or sessionStorage) has been modified in the + // > context of another document. + // https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event + // + // So for now, we won't impement the feature. } pub fn _clear(self: *Bottle) void { self.free(); self.map.clearRetainingCapacity(); - // TODO dispatch event // > Broadcast this with null, null, and null. // https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface + // + // > The storage event of the Window interface fires when a storage + // > area (localStorage or sessionStorage) has been modified in the + // > context of another document. + // https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event + // + // So for now, we won't impement the feature. } };