The majority of Joomla's core JS is written in ES2015+ which is great, but when loading either the frontend or backend, it loads the ES2013 files.
Does Joomla plan on adding the ability to load the .es6.js
files?
Labels |
Added:
?
|
Sadly nobody did a pr to move to es6 and fall back to oder versions.
Well, that was the intention right from the beginning but due to lack of contributors the ES6 project was never finalised. The only tasks remaining:
type=module
and the ES5 will get an attributes defer=defer + nomodule
)Aren't that multiple things? I mean using es6 files doesn't force us to use deferring / type=module or loading script at the end of the HTML correct?
First it would be great if we don't load the < es6 files per default.
First it would be great if we don't load the < es6 files per default.
You have 2 options:
If you use type=module/nomodule
you're effectively doing feature detection. This is the most efficient option. The only drawback as I mentioned above is that type=module
is by default (and cannot be changed) deferred. Thus all the rest for the inline scripts. This is the industry standard, if you decide to do something different you're gonna be again the black sheep...
@dgrammatiko @Fedik is there anything to do here? Has it been resolved? Is it a non-issue?
Has it been resolved?
Yup, Joomla is using the type=module/nomodule
attributes so effectively 2017+ browsers get the ES6 files and older browsers get the ES5. I think we can close this
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-08 22:16:56 |
Closed_By | ⇒ | Quy |
The es2013 files are only for developers that need then for legacy browser support.
Sadly nobody did a pr to move to es6 and fall back to oder versions.