We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like Chromium based browsers (but not Safari) do not handle the callback function given to array.sort().
array.sort()
This was discovered from https://codepen.io/htmx/pen/BamPGPE?editors=1101
Note: sort() without the callback function works as expected.
sort()
<button _="on click set x to [5, 9, 1] then log x.sort(\ a, b -> a > b)">Test</button>
Expected result: [1,5,9]
[1,5,9]
Actual results (on MacOS 14.3.1):
✅ Firefox 122.0.1: [1,5,9] ✅ Safari 17.3.1: [1,5,9] ❌ Chrome 120.0.6099.216: [5,9,1] ❌ Chrome 121.0.6167.184: [5,9,1] ❌ Brave 1.62.165 Chromium: 121.0.6167.184: [5,9,1]
[5,9,1]
The text was updated successfully, but these errors were encountered:
I can look into this.
Sorry, something went wrong.
No branches or pull requests
Looks like Chromium based browsers (but not Safari) do not handle the callback function given to
array.sort()
.This was discovered from
https://codepen.io/htmx/pen/BamPGPE?editors=1101
Note:
sort()
without the callback function works as expected.<button _="on click set x to [5, 9, 1] then log x.sort(\ a, b -> a > b)">Test</button>
Expected result:
[1,5,9]
Actual results (on MacOS 14.3.1):
✅ Firefox 122.0.1:
[1,5,9]
✅ Safari 17.3.1:
[1,5,9]
❌ Chrome 120.0.6099.216:
[5,9,1]
❌ Chrome 121.0.6167.184:
[5,9,1]
❌ Brave 1.62.165 Chromium: 121.0.6167.184:
[5,9,1]
The text was updated successfully, but these errors were encountered: