You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2022/01/31 16:40:02 UTC
[sling-org-apache-sling-dynamic-include] 01/03: SLING-11087: Fix for multiple components being fetched via JSI
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-dynamic-include.git
commit b532808810c7c975d9478bc42a34937242605797
Author: Jakob Rosenlund <ja...@miracle.dk>
AuthorDate: Tue Jan 25 11:01:58 2022 +0100
SLING-11087: Fix for multiple components being fetched via JSI
---
src/main/resources/generators/javascript.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/generators/javascript.html b/src/main/resources/generators/javascript.html
index f4d8358..4915a02 100755
--- a/src/main/resources/generators/javascript.html
+++ b/src/main/resources/generators/javascript.html
@@ -19,13 +19,13 @@
<div id="${uniqueId}">
<script type="text/javascript">
if (window.XMLHttpRequest) {
- var xhr = new XMLHttpRequest();
+ let xhr = new XMLHttpRequest();
xhr.open('GET', encodeURI("${url}"));
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.timeout = 10000;
xhr.onload = function () {
if (xhr.status >= 200 && xhr.status < 300) {
- var elemId = document.getElementById('${uniqueId}');
+ let elemId = document.getElementById('${uniqueId}');
if (elemId) elemId.innerHTML = xhr.responseText;
}
};