aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-09-07 15:36:30 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-09-07 15:36:30 +0300
commit47ae24284e7791239d3d3c3fac90407c88cd93c2 (patch)
treecd07f2b52313a351e3222c0cb9b9cc23888fffd0
parent886bac0089a8c3363a3e475a46304719e72169c8 (diff)
downloadarching-kaos-web-ui-47ae24284e7791239d3d3c3fac90407c88cd93c2.tar.gz
arching-kaos-web-ui-47ae24284e7791239d3d3c3fac90407c88cd93c2.tar.bz2
arching-kaos-web-ui-47ae24284e7791239d3d3c3fac90407c88cd93c2.zip
Added params to be passed to the callback function
-rw-r--r--src/js/arching-kaos-fetch.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/arching-kaos-fetch.js b/src/js/arching-kaos-fetch.js
index bc982f9..c349081 100644
--- a/src/js/arching-kaos-fetch.js
+++ b/src/js/arching-kaos-fetch.js
@@ -1,4 +1,4 @@
-function archingKaosFetchJSON( url, callback ){
+function archingKaosFetchJSON( url, callback, params ){
// fetch(url, {
// method:'GET',
// headers:{
@@ -19,7 +19,7 @@ function archingKaosFetchJSON( url, callback ){
request.addEventListener("load", ()=>{
console.log(request.response);
var json = JSON.parse(request.response);
- callback(json);
+ callback(json, params);
});
request.addEventListener("error", ()=>{
console.log("An error occured.");