-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve spec-compliance of PerformanceObserver.prototype.observe
Summary: Our implementation of `PerformanceObserver.prototype.observe` diverges a little bit from the [spec](https://w3c.github.io/performance-timeline/#dom-performanceobserver-observe) regarding the behavior when calling it multiple times. E.g.: 1. We don't throw errors if both `type ` and `entryTypes` are passed. 2. We don't throw errors if neither `type ` nor `entryTypes` are passed. 3. We don't throw errors if we call observe with `type` and we call again later with `entryTypes`, and vice versa. 4. The logic to consolidate entry types in subsequent observe calls is incorrect. This fixes those issues and also applies some minor naming improvements. Changelog: [internal] Reviewed By: rshest Differential Revision: D41872269 fbshipit-source-id: 9a6b485f4ef2f479c8b6f0307012322f65a11879
- Loading branch information
1 parent
120e87b
commit 5d8fae9
Showing
1 changed file
with
94 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters