anishghosh103 / whatsapp

Responsive Whatsapp Design using Bootstrap 4.1
https://anishghosh103.github.io/whatsapp
65 stars 40 forks source link

method to received new message #2

Open wagnerfillio opened 5 years ago

wagnerfillio commented 5 years ago

Hello, this application is very good.

I am trying to use it for one user to send a message and the other user to receive it.

I have an application running on JQuery and Socket IO and it works fine.

But your code is cleaner, although I do not understand much about pure javascript.

I've already connected your application with the database.

My question is.

Which method can I use to retrieve a new received message?

At first, I added an event to simply fetch a new message, but I still do not know which method to call.

element.addEventListener ("click", function () {alert ("getNewMessage!");});