async function click(){
await ajax.bind(this);
console.log(this.parentNode.parentNode.querySelectorAll(".style-products-wrapper .active-style-product"));
}
function click(){
let p = new Promise(ajax.bind(this));
p.then(console.log(this.parentNode.parentNode.querySelectorAll(".style-products-wrapper .active-style-product")), console.log("ошибка"));
}
function click(){
let p = new Promise(ajax.bind(this));
p.then(console.log(this.parentNode.parentNode.querySelectorAll(".style-products-wrapper .active-style-product")),
console.log("ошибка"));
}
let ajax= function(src) {
return new Promise((resolve, reject) => {...})
}
function click(){
ajax(this).then(console.log(123));
}
async function getStyles(elem){}