User tests: Successful: Unsuccessful:
Pull Request for Issue #19218 .
Web Components and custom Elements are ES6 by definition, forcing to ES5 will fail on all ES6 capable browsers (eg 96% of them), unless there is also a patch for allowing ES5 class to act as ES6. We are using Babel to transpile from ES6 to ES5 and there is a missing part that patches Classes for custom Elements to act as native ES6 code. This is what you'll get:
Or open the codpen in chrome or safari: https://codepen.io/dgt41/pen/BJRrJN and check the console for errors!
BUT, because something went terribly wrong on the server we shouldn't deliver a crap experience. So let's load the CE the right way:
This is what we sent:
and this is how it becomes once page loaded:
Try creating some errors back end and front end. Observe that the alert custom element (the script) is correctly loaded
No
@wilsonge this one is for you
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) Front End Templates (site) JavaScript |
Labels |
Added:
?
|
@C-Lodder this way of loading the custom elements was on my todo list for some time: https://github.com/joomla/joomla-cms/pull/17868/files#diff-a404964c9e0cca2cfd95296f205c3006R56
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-02 22:13:07 |
Closed_By | ⇒ | wilsonge |
You can't use the alert custom element in the tag for obvious reasons :)
That needs to be left as a div with the standard BS styling