response.render(OnDomReadyHeaderItem.forScript(script.toString()));
}
private CharSequence compressJavaScript(CharSequence script) {
final IJavaScriptCompressor compressor;
if (JQContributionConfig.get().isUseYuiJavascriptCompressor())
compressor = YuiJavascriptCompressor.get();
else
compressor = Application.get().getResourceSettings().getJavaScriptCompressor();
return (compressor != null && Utils.isNotBlank(script)) ?
compressor.compress(String.valueOf(script)) : script;
}