Update browser requirements to es2022 #2176
Open
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.
This updates the minimum supported browser versions to Firefox 115/Chrome 103, which enables the use of modern es2022 javascript constructs while keeping the maximum operating system support.
Firefox 115 ESR and Chrome 103 will both run on Windows 7 and MacOS 10.12. Chrome 103 will also run on MacOS 10.11; it's not worth dropping the Firefox version low enough to support both browsers on this OS (no
import()
support, which is the whole point of making this change).This should not exclude XKit use on any relevant Firefox fork; being based on at least the oldest supported ESR should be a baseline requirement for use, and per my testing all reasonable Firefox forks are now on 128 ESR anyway (as of https://blog.ablaze.one/4464/2024-08-01/)
This enables the use of, for example:
.?
''.replaceAll()
??=
:not(a, b)
selectorsawait
import()
[].at()
[].findLast()
This then makes use of dynamic import to replace an otherwise-unnecessary eval in xkit.js. Dynamic import change tested and working in Firefox 89/Chrome 88 (they're the versions I had lying around).
Edit: Also tested in Edge 109 and Firefox 115 on Windows 7.