[Webkit-unassigned] [Bug 209216] New: PerformanceObserver should work without the `entryTypes` options
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 17 19:45:50 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=209216
Bug ID: 209216
Summary: PerformanceObserver should work without the
`entryTypes` options
Product: WebKit
Version: Safari 13
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philip at philipwalton.com
** Steps to reproduce: **
1. Navigate to example.com (or any web page) in Safari and run the following code in the console:
```
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry);
}
}).observe({type: 'resource'});
```
2. Notice that the following error is thrown:
TypeError: Member PerformanceObserverInit.entryTypes is required and must be an instance of sequence
** What should happen: **
No error should be thrown if the `type` options is used instead of `entryTypes`.
** Justification: **
The WebIDL for PerformanceObseverInit [1] shows that it accepts either an `entryTypes` option OR a `type` option:
```
dictionary PerformanceObserverInit {
sequence<DOMString> entryTypes;
DOMString type;
boolean buffered;
};
```
[1] https://w3c.github.io/performance-timeline/#dom-performanceobserverinit
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200318/2b661a19/attachment.htm>
More information about the webkit-unassigned
mailing list