From df9779ec5985ae0afed5886624620234620fff87 Mon Sep 17 00:00:00 2001 From: egrs Date: Tue, 17 Feb 2026 16:12:20 +0100 Subject: [PATCH] restrict buffered option to type-based observation per spec The buffered option is only valid with the type option, not entryTypes, per the Performance Observer specification. --- src/browser/webapi/PerformanceObserver.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/browser/webapi/PerformanceObserver.zig b/src/browser/webapi/PerformanceObserver.zig index cd6a672e..088128b1 100644 --- a/src/browser/webapi/PerformanceObserver.zig +++ b/src/browser/webapi/PerformanceObserver.zig @@ -115,7 +115,8 @@ pub fn observe( self._interests = interests; // Deliver existing entries if buffered option is set. - if (options.buffered) { + // Per spec, buffered is only valid with the type option, not entryTypes. + if (options.buffered and options.type != null) { for (page.window._performance._entries.items) |entry| { if (self.interested(entry)) { try self._entries.append(page.arena, entry);