14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
document.addEventListener('htmx:wsConfigSend', function (e) {
|
|
if (e.target.classList.contains('intersection')) {
|
|
const row = parseInt(e.target.dataset.row);
|
|
const col = parseInt(e.target.dataset.col);
|
|
|
|
// Set the custom JSON data
|
|
e.detail.parameters = {
|
|
type: 'make_move',
|
|
row: row,
|
|
col: col,
|
|
};
|
|
}
|
|
});
|