?
avatar dgt41
dgt41
25 Mar 2018

Pull Request for Issue # .

Summary of Changes

Scripts need to be decoupled from the DOMConetentLoaded event. Two main reasons for this:

  • easier tests (as long as we get rid of the requireJS)
  • make them PWA ready!

Testing Instructions

Check that forms still validate correctly in the back end

Expected result

Actual result

Documentation Changes Required

@dneukirchen @Fedik

avatar dgt41 dgt41 - open - 25 Mar 2018
avatar Fedik
Fedik - comment - 26 Mar 2018

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

avatar dgt41
dgt41 - comment - 26 Mar 2018

@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

avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Mar 2018
Category JavaScript
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 Mar 2018
Status New Discussion
avatar Fedik
Fedik - comment - 28 Mar 2018

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

avatar wilsonge wilsonge - change - 1 Apr 2018
Title
[4.0] Properly init a script!
[4.0][WIP] Properly init a script!
avatar wilsonge wilsonge - edited - 1 Apr 2018
avatar dgrammatiko dgrammatiko - change - 9 Jul 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-07-09 09:37:20
Closed_By dgrammatiko
Labels Added: ?
avatar dgrammatiko dgrammatiko - close - 9 Jul 2018

Add a Comment

Login with GitHub to post a comment