mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user