Skip to content

lib, doc: standardize params in PerformanceObserver.observe - #47025

Closed
umuoy1 wants to merge 2 commits into
nodejs:mainfrom
umuoy1:oberve-type-check
Closed

lib, doc: standardize params in PerformanceObserver.observe#47025
umuoy1 wants to merge 2 commits into
nodejs:mainfrom
umuoy1:oberve-type-check

Conversation

@umuoy1

Copy link
Copy Markdown
Contributor

This fixes missing validation when options.buffered and options.entryType are both set in PerformanceObserver.observe
https://www.w3.org/TR/performance-timeline/#observe-method

If options's entryTypes is present and any other member is also present, then throw a "TypeError".

@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Mar 9, 2023
@umuoy1umuoy1 changed the title lib, doc: throw TypeError when options.buffered and options.entryType both setlib, doc: inappropriate params validation in observeMar 15, 2023
@umuoy1umuoy1 changed the title lib, doc: inappropriate params validation in observelib, doc: standardize params in PerformanceObserver.observeMar 17, 2023
@legendecaslegendecas added semver-major PRs that contain breaking changes and should be released in the next major version. perf_hooks Issues and PRs related to the implementation of the Performance Timing API. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 31, 2023
});
}, "Calling observe() with type and entryTypes should throw a TypeError");

test(() => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in WPT should be submitted to the upstream first: https://github.com/web-platform-tests/wpt.

In the meantime, you can move this test case to test/parallel/ directory. That's where Node.js' test cases are located at.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have the changes been upstreamed?

@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 31, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.perf_hooksIssues and PRs related to the implementation of the Performance Timing API.semver-majorPRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@umuoy1@nodejs-github-bot@legendecas@aduh95