GitHub user svenmeier opened a pull request:
https://github.com/apache/wicket/pull/258
Wicket 6498 deferred javascript made simple
This is a much simpler solution than #253: Applications can just use a
JavaScriptDeferHeaderResponse and that's it.
Application has to be changed slightly in its handling of
IHeaderResponseDecorators: there's always a decorator that applies a
ResourceAggregator - this enables us to chain a header response *behind* the
ResourceAggregator.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/wicket
WICKET-6498_deferred_javascript_2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/wicket/pull/258.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 #258
----
commit c89546bf04cea718ee47cf80ae41e447f90975af
Author: Sven Meier <svenmeier@...>
Date: 2018-01-22T10:33:46Z
WICKET-6498 JavaScriptDeferHeaderResponse
- translates OnDomReady and Load header items to their native non-jquery
equivalents
- application uses a default IHeaderResponseDecorator now, that decorates
with the ResourceAggregator; this allows to chain header response before and
*after* the aggregator
commit a8588aa1a371599f09e2d8b7b5752aac57308c9a
Author: Sven Meier <svenmeier@...>
Date: 2018-01-22T10:45:36Z
WICKET-6498 always add event listener regardless of readyState
for Ajax requests PartialPageUpdate will pack all OnDomReady and OnLoad
items into an <evaluate> block anyways
----
---