[ https://issues.apache.org/jira/browse/WICKET-6321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423676#comment-16423676 ]
ASF GitHub Bot commented on WICKET-6321: ---------------------------------------- Github user svenmeier commented on a diff in the pull request: https://github.com/apache/wicket/pull/273#discussion_r178752934 --- Diff: wicket-core/src/main/java/org/apache/wicket/core/util/string/JavaScriptUtils.java --- @@ -151,6 +152,30 @@ public static void writeJavaScriptUrl(final Response response, final CharSequenc */ public static void writeJavaScriptUrl(final Response response, final CharSequence url, final String id, boolean defer, String charset, boolean async) + { + writeJavaScriptUrl(response, url, id, defer, charset, async, null); + } + /** + * Write a reference to a javascript file to the response object + * + * @param response + * The HTTP response + * @param url + * The javascript file URL + * @param id + * Unique identifier of element + * @param defer + * specifies that the execution of a script should be deferred (delayed) until after + * the page has been loaded. + * @param charset + * a non null value specifies the charset attribute of the script tag + * @param async + * specifies that the script can be loaded asynchronously by the browser + * @param integrity + * integrity attributes + */ + public static void writeJavaScriptUrl(final Response response, final CharSequence url, + final String id, boolean defer, String charset, boolean async, final IntegrityAttributed integrity) --- End diff -- Perhaps it's better to switch to an attribute map instead? The method had too much parameters already. > Support Integrity and Crossorigin attributes for > JavaScriptUrlReferenceHeaderItem > ---------------------------------------------------------------------------------- > > Key: WICKET-6321 > URL: https://issues.apache.org/jira/browse/WICKET-6321 > Project: Wicket > Issue Type: Improvement > Components: wicket > Affects Versions: 8.0.0-M3 > Reporter: Mikhail Fursov > Priority: Major > Fix For: 8.0.0 > > Attachments: wicket-6321-20180306.diff, wicket-6321.diff > > > Example of secure script reference: > <script > src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" > integrity="sha256-+kIbbrvS+0dNOjhmQJzmwe/RILR/8lb/+4+PUNVW09k=" > crossorigin="anonymous"></script> -- This message was sent by Atlassian JIRA (v7.6.3#76005)