wip adding attributes, works with filter wp-script-attributes

This commit is contained in:
asus
2024-02-27 11:51:46 +01:00
parent 81f3f8a7e7
commit 7a8c0750c5
4 changed files with 87 additions and 47 deletions

View File

@@ -1,3 +1,5 @@
import {PLGNTLS_fetch} from '../../utils/plgntls_fetch.js';
const inputElement = document.getElementById('mytext');
const sendButton = document.getElementById('mybutton');
@@ -10,7 +12,9 @@ sendButton.addEventListener('click', () => {
inputValue = JSON.stringify(inputValue);
console.log("inputValue:");
console.log(inputValue);
PLGNTLS_fetch('/get_data', {inputValue})
PLGNTLS_fetch('/plgntls/get_data', {
method: "POST",
})
//PLGNTLS_fetch('get_data', {body: {inputValue}})
.then((response) => response.json())
.then((data) => {