-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 033506: correct droppedEntriesCount #33538
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
608b487
Fix issue 033506: correct droppedEntriesCount
wbamberg 6f58c70
Clarify when dropped entries are provided
wbamberg c02d7f2
Update files/en-us/web/api/performanceobserver/performanceobserver/in…
wbamberg 7dfecd9
Update files/en-us/web/api/performanceobserver/performanceobserver/in…
wbamberg 2d0785c
Update files/en-us/web/api/performanceobserver/performanceobserver/in…
wbamberg faeb8ee
Update files/en-us/web/api/performanceobserver/performanceobserver/in…
wbamberg a67561b
Fix dl markup
wbamberg e426e52
Fix issue 033506: add a page on CLS
wbamberg 4cdceca
Remove CLS page
wbamberg cb93001
Update files/en-us/web/api/performanceobserver/performanceobserver/in…
wbamberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe optional here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to do this we should instead use the
{{optional_inline}}
macro after the parameter name (like this: https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options).But, 2 things.
I talked about this a bit in the PR description: "optional" is weird when we're talking about callback parameters. When we use "optional" for a normal API method the semantics is clear: developers don't have to supply a value, and if they don't, some default is used. But with a callback, the developers aren't calling it, so how are developers supposed to interpret "optional"? I think it is probably better, rather than "optional", to describe exactly why/under which circumstances the parameter is not passed, so developers know when they can access it.
Although this parameter is marked optional in the IDL, I can't understand from the spec how it is optional. AFAICS the relevant bit is https://w3c.github.io/performance-timeline/#queue-the-performanceobserver-task, which has:
I don't see any indication there that
options
may not be passed. It will be empty, for all but the first callback invocation, based on steps 7 and 8. So what am I missing here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair that it will be empty rather than missing. I guess I'm just trying to avoid the original confusion that was raised in #33506 where the user was confused why it wasn't there as they expected it to contain a value every time (where the
droppedEntriesCount
would be0
every time after the first—that's not the case). I can understand that confusion. But maybe with all your other changes it's sufficient.