Skip to content

Commit

Permalink
Merge pull request #379 from basil/remove-prototype
Browse files Browse the repository at this point in the history
Replace Prototype.js with native JavaScript
  • Loading branch information
KostyaSha authored May 16, 2023
2 parents a73e7f6 + 00b9017 commit 7aa703e
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 7aa703e

Please sign in to comment.