GitHub user svenmeier opened a pull request:
https://github.com/apache/wicket/pull/253
WICKET-6498 deferred javascript
If addEventListener is used instead of jQuery "domready" and "load"
events, and OnLoadHeaderItem instead of JavaScriptHeaderItem, all JavaScript
resources can be deferred.
Open questions:
- does this solution work reliably on all browsers?
- who decides which JavaScript resources to defer and which not?
- how to handle cases where user code is still using a JavaScriptHeaderItem?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/wicket WICKET-6498_deferred_javascript
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/wicket/pull/253.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #253
----
commit d77ba274f38953b6d5ab1088c7a9555111acd4fc
Author: Sven Meier <svenmeier@...>
Date: 2018-01-02T10:20:03Z
WICKET-6498 deferred javascript
use OnLoadHeaderItem instead of JavaScriptHeaderItem, addEventListener
instead of jQuery;
defer all JavaScript resources for now
----
---