Skip to content

Make position and error nullable.#77

Merged
mikewest merged 2 commits intomainfrom
mikewest-patch-1
Nov 20, 2025
Merged

Make position and error nullable.#77
mikewest merged 2 commits intomainfrom
mikewest-patch-1

Conversation

@mikewest
Copy link
Member

I think the intent here matches WebIDL's "nullable" concept, which also happens to line up with Chromium's current behavior (which returns null rather than undefined if a position hasn't yet been obtained).

I think the intent here matches WebIDL's "nullable" concept,
which also happens to line up with Chromium's current
behavior (which returns `null` rather than `undefined` if a
position hasn't yet been obtained).
@mikewest mikewest requested a review from otherdaniel November 18, 2025 11:34
@mikewest mikewest changed the title Make position and positionError nullable. Make position and error nullable. Nov 18, 2025
greater than zero.
1. Initialize the internal {{[[position]]}} to undefined.
1. Initialize the internal {{[[positionError]]}} to undefined.
1. Initialize the internal {{[[position]]}} to `null`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

editorial nitpick: Infra spec wants null to be regular text, not null.

(I found that surprising as well, but... it does match common use in other specs.)

Ref: https://infra.spec.whatwg.org/#primitive-data-types

Copy link
Member Author

Choose a reason for hiding this comment

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

Meh. Infra seems wrong, but I changed the PR anyway. :)

@mikewest mikewest merged commit d6ac7b4 into main Nov 20, 2025
3 checks passed
@mikewest
Copy link
Member Author

(I landed this; if you still wish to see changes, lmk.)

@mikewest mikewest deleted the mikewest-patch-1 branch November 20, 2025 10:53
github-actions bot added a commit that referenced this pull request Nov 20, 2025
SHA: d6ac7b4
Reason: push, by mikewest

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Nov 20, 2025
SHA: d6ac7b4
Reason: push, by mikewest

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to otherdaniel/PEPC that referenced this pull request Nov 25, 2025
SHA: d6ac7b4
Reason: push, by otherdaniel

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to otherdaniel/PEPC that referenced this pull request Nov 25, 2025
SHA: d6ac7b4
Reason: push, by otherdaniel

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants