public class JavaScriptDeferHeaderResponse extends DecoratingHeaderResponse
AbstractJavaScriptReferenceHeaderItems.
To prevent any error because of possible dependencies to referenced JavaScript files
*all* JavaScriptHeaderItems are replaced with suitable implementations that
delay any execution until all deferred AbstractJavaScriptReferenceHeaderItems
have been loaded.
Note: This solution depends on the execution order of JavaScript in the browser:
The 'DOMContentLoaded' event has to be fired
| Constructor and Description |
|---|
JavaScriptDeferHeaderResponse(IHeaderResponse response)
Decorate the given response.
|
| Modifier and Type | Method and Description |
|---|---|
void |
render(HeaderItem item)
Renders the given
HeaderItem to the response if none of the
tokens of the item has been rendered before. |
close, getRealResponse, getResponse, isClosed, markRendered, wasRenderedpublic JavaScriptDeferHeaderResponse(IHeaderResponse response)
response - public void render(HeaderItem item)
IHeaderResponseHeaderItem to the response if none of the
tokens of the item has been rendered before.render in interface IHeaderResponserender in class DecoratingHeaderResponseitem - The item to render.Copyright © 2006–2018 Apache Software Foundation. All rights reserved.