Skip to content

Conversation

@shannonbooth
Copy link
Member

@shannonbooth shannonbooth commented May 12, 2025

I noticed this algorithm in the infra spec, and I believe this is what all engines already do for the sort.

Hopefully not mistaken!


Preview | Diff

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

Thanks for noticing this. We want to reference https://infra.spec.whatwg.org/#list-sort-in-ascending-order here as well and update the wording to follow that (similar to the example).

@shannonbooth
Copy link
Member Author

Thanks for noticing this. We want to reference infra.spec.whatwg.org#list-sort-in-ascending-order here as well and update the wording to follow that (similar to the example).

Thanks! Made that edit, though I'm not 100% sure I got the tuple part of this completely correct in proper spec wording

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

The wording looks correct, but we need to start with something like:

Set this's list to the result of sorting in ...

as we are now allocating a new list instead of mutating in place.

@annevk annevk closed this May 12, 2025
@annevk annevk reopened this May 12, 2025
@annevk annevk merged commit 59979a1 into whatwg:main May 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants