Skip to content

Commit 61357ee

Browse files
committed
storage: update comment about dispatch event
1 parent 3c5d601 commit 61357ee

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/storage/storage.zig

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,45 @@ pub const Bottle = struct {
147147
return DOMError.QuotaExceeded;
148148
};
149149

150-
// TODO dispatch event
151150
// > Broadcast this with key, oldValue, and value.
152151
// https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface
152+
//
153+
// > The storage event of the Window interface fires when a storage
154+
// > area (localStorage or sessionStorage) has been modified in the
155+
// > context of another document.
156+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event
157+
//
158+
// So for now, we won't impement the feature.
153159
}
154160

155161
pub fn _removeItem(self: *Bottle, k: []const u8) !void {
156162
const old = self.map.fetchRemove(k);
157163
if (old == null) return;
158164

159-
// TODO dispatch event
160165
// > Broadcast this with key, oldValue, and null.
161166
// https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface
167+
//
168+
// > The storage event of the Window interface fires when a storage
169+
// > area (localStorage or sessionStorage) has been modified in the
170+
// > context of another document.
171+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event
172+
//
173+
// So for now, we won't impement the feature.
162174
}
163175

164176
pub fn _clear(self: *Bottle) void {
165177
self.free();
166178
self.map.clearRetainingCapacity();
167179

168-
// TODO dispatch event
169180
// > Broadcast this with null, null, and null.
170181
// https://html.spec.whatwg.org/multipage/webstorage.html#the-storageevent-interface
182+
//
183+
// > The storage event of the Window interface fires when a storage
184+
// > area (localStorage or sessionStorage) has been modified in the
185+
// > context of another document.
186+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event
187+
//
188+
// So for now, we won't impement the feature.
171189
}
172190
};
173191

0 commit comments

Comments
 (0)