Pull Request for Issue # .
Scripts need to be decoupled from the DOMConetentLoaded
event. Two main reasons for this:
Check that forms still validate correctly in the back end
@Fedik but you know our js tests...
P in PWA stands for progressive. And progressive can have many translations but what most people think as progressive (in terms of assets here) is that you send just the html doc with inline css and script (only the critical parts) and everything else is loaded after first meaningful paint. Check the Google Lighthouse and all the failures and you'll figure it out as well. So if you're about to lazy load scripts then the DOMContentLoaded
is a dead end
Category | ⇒ | JavaScript |
Status | New | ⇒ | Discussion |
hm hm, I understood, it can work,
but can we hold with this for now? I think it not really important for now, and just add confusing: "when to use DOMContentLoaded
or load
and when this hacky approach"
it can be added at any point of time, and maybe after some time we will get a better idea for it
Title |
|
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-09 09:37:20 |
Closed_By | ⇒ | dgrammatiko | |
Labels |
Added:
?
|
hmm, I think I am confused?
how it make them PWA ready?
and, for a tests you always can trigger custom event
DOMContentLoaded
, if need to test it