Skip to content

Conversation

@legendecas
Copy link
Member

  • Exposes PerformanceEntry and PerformanceResourceTiming to the globalThis.
  • Event handler properties defined by defineEventHandler should check if this is a valid EventTarget, as enforced by the idlharness.
  • Corrected PerformanceResourceTiming to inherit the public interface PerformanceEntry instead of the internal InternalPerformanceResourceTiming.

The first commit comes from #44439.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Aug 30, 2022
@legendecas legendecas force-pushed the resource-timing-idlharness branch from 04099b8 to 5aa4d1a Compare August 30, 2022 17:09
async function main() {
const invalidValues = [ null, undefined, true, false, -1, 1.1, Infinity, NaN, '', 'foo', {}, [], () => {} ];
for (const value of invalidValues) {
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`);
Copy link
Contributor

Choose a reason for hiding this comment

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

What should it throw?

Suggested change
assert.throws(() => performance.setResourceTimingBufferSize(value), `${value} should throw`);
assert.throws(() => performance.setResourceTimingBufferSize(value), { code:`ERR_INVALID_ARG_TYPE` });

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 30, 2022
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

Semver-major as it adds a new global. It should be documented in globals.md, and an entry should be added in lib/eslintrc.yml as well.

@legendecas
Copy link
Member Author

Not all of the changes should be semver-major. I'll split this PR into smaller ones.

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

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. semver-major PRs 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.

3 participants