You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
326 B
19 lines
326 B
const player = {
|
|
name: ""
|
|
};
|
|
|
|
const socket = io();
|
|
|
|
|
|
const username = document.querySelector('#username').value;
|
|
const form = document.querySelector('#form');
|
|
|
|
form.on('submit', (e) => {
|
|
e.preventDefault();
|
|
|
|
player.username = usernameInput.value;
|
|
socket.emit('playerData', player);
|
|
});
|
|
|
|
console.log("coucou");
|