Skip to content
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

Replaced the custom "xsplit" function with the standard JavaScript split function #32

Closed
herrvigg opened this issue Jun 21, 2018 · 3 comments
Labels
enhancement New feature or request legacy PR Legacy PR imported from original repo

Comments

@herrvigg
Copy link
Collaborator

Issue by mweimerskirch
Monday Feb 23, 2015 at 23:14 GMT
Originally opened as qTranslate-Team/qtranslate-x#32


I'm still trying to make the code more readable and easier to test and extend. IMHO the "xsplit" function can be removed. The function was necessary for qtranslate to be compatible with older browsers. Newer browser that implement ECMAScript 5 (this includes IE 9 in "standards mode") do not need this any longer. This would make the code a bit more readable, but IE 8 on the other hand would no longer be compatible. However, as WordPress displays a big warning when you use the admin area with IE 8 (or other old browsers), this should not be a problem.


mweimerskirch included the following code: https://github.com/qTranslate-Team/qtranslate-x/pull/32/commits

@herrvigg herrvigg added enhancement New feature or request legacy issue Legacy issue imported from original repo labels Jun 21, 2018
@herrvigg
Copy link
Collaborator Author

Comment by mweimerskirch
Wednesday Feb 25, 2015 at 10:46 GMT


I tested the change in a lot of browsers. The only ones that failed were IE <= 8 (where WordPress displays a big warning message in the admin area so) and Konqueror (even in the most recent version). All other browsers I tested work fine. You can test for yourself if the "split" function is implemented correctly in a certain browser with this simple test page: http://michel.weimerskirch.net/xsplit-test.html (e.g. using browserstack.com).
If it's green, that means the split function captures the separator, if it's red, it didn't work and the "xsplit" workaround is still needed.
I added the same headers that WordPress uses, so IE works in the same "mode" than the WordPress admin interface.

IMHO this patch can be applied.

@herrvigg herrvigg added legacy PR Legacy PR imported from original repo and removed legacy issue Legacy issue imported from original repo labels Jun 22, 2018
@herrvigg
Copy link
Collaborator Author

herrvigg commented Apr 10, 2021

The problem is not split but @@split related to the regex. Now that we have moved to webpack #990 the bundle uses browserslist which still supports IE up to version 11. It seems not even IE11 supports this feature:
https://caniuse.com/mdn-javascript_builtins_regexp_--split
Maybe that's not fully accurate?

Eventually we may break the support for IE11 that only receives minimum security updates but that should be consistent with browserslist for the JS bundles.

herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandonned support of IE with WP5.8 in July 2021.
Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for RegExp:@@split
See also https://caniuse.com/?search=%40%40split

2) Update our `browserlist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandonned support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for RegExp:@@split
See also https://caniuse.com/?search=%40%40split

2) Update our `browserlist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandonned support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/?search=%40%40split

2) Update our `browserlist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandonned support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/?search=%40%40split

2) Update our `browserslist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/?search=%40%40split

2) Update our `browserslist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/mdn-javascript_builtins_regexp_--split

2) Update our `browserslist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned the support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/mdn-javascript_builtins_regexp_--split

2) Update our `browserslist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned the support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/mdn-javascript_builtins_regexp_--split

2) Update our `browserslist` for JS to be synced with WordPress
https://github.com/WordPress/wordpress-develop/blob/trunk/package.json

3) Add more debug info about browser in the troubleshooting section.
@herrvigg
Copy link
Collaborator Author

herrvigg commented Apr 7, 2023

Fixed by #1313.

@herrvigg herrvigg closed this as completed Apr 7, 2023
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned the support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/mdn-javascript_builtins_regexp_--split

2) Add more debug info about browser in the troubleshooting section.
herrvigg added a commit that referenced this issue Apr 7, 2023
WordPress abandoned the support of IE with WP5.8 in July 2021.
https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/

Though we don't require that version of WP, it's time to abandon
that legacy. See also this very old ticket: #32.

1) Remove workaround for `RegExp:@@split`
See also https://caniuse.com/mdn-javascript_builtins_regexp_--split

2) Add more debug info about browser in the troubleshooting section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request legacy PR Legacy PR imported from original repo
Projects
None yet
Development

No branches or pull requests

1 participant