Skip to content

Commit

Permalink
Replace Prototype.js with native JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed May 16, 2023
1 parent a73e7f6 commit 00b9017
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
function callFeature(button, answerPlaceId, parameters) {
new Ajax.Request(button.action, {
fetch(button.action, {
method: "post",
parameters: parameters,
onComplete: function (rsp) {
answerPlaceId.innerHTML = rsp.responseText;
}
headers: crumb.wrap({}),
body: new URLSearchParams(parameters),
}).then(rsp => {
rsp.text().then((responseText) => {
answerPlaceId.innerHTML = responseText;
});
});
return false;
}
Expand Down

0 comments on commit 00b9017

Please sign in to comment.