marked potential improvement for the future

This commit is contained in:
Maccesch 2024-02-11 12:23:01 +00:00
parent 3243f693c9
commit 91278df889

View file

@ -152,6 +152,7 @@ where
let key = key.to_owned(); let key = key.to_owned();
let on_error = on_error.to_owned(); let on_error = on_error.to_owned();
queue_microtask(move || { queue_microtask(move || {
// TODO : better to use a BroadcastChannel (use_broadcast_channel)?
// Note: we cannot construct a full StorageEvent so we _must_ rely on a custom event // Note: we cannot construct a full StorageEvent so we _must_ rely on a custom event
let mut custom = web_sys::CustomEventInit::new(); let mut custom = web_sys::CustomEventInit::new();
custom.detail(&JsValue::from_str(&key)); custom.detail(&JsValue::from_str(&key));