From 4cdf8b441ea91a5c0edc872e1410aefdbfa12e10 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Mon, 20 Jul 2026 11:55:07 +0800 Subject: [PATCH] webapi: Support max-age for CookieStore Normalize get name so that it matches the normalize stored cookie name. Don't queue cookie change event if there's no listener. This one's a bit tricky since we do this check inside the callback already. But that means a listener added after the event is created (but before it's delivered) gets a change event it should not. So we need to check it both at event-creation time and at delivery time. --- src/browser/tests/cookie_store.html | 65 +++++++++++++++++++ src/browser/webapi/storage/CookieStore.zig | 72 ++++++++++++++++++---- 2 files changed, 124 insertions(+), 13 deletions(-) diff --git a/src/browser/tests/cookie_store.html b/src/browser/tests/cookie_store.html index b688d6506..b1420a0d3 100644 --- a/src/browser/tests/cookie_store.html +++ b/src/browser/tests/cookie_store.html @@ -73,6 +73,71 @@ }); + + + +