In this chapter, we worked on generating text and location messages. We looked into generating the newMessage
object and then writing a test case for it. Then, we learned about how to use event acknowledgments. Then we added the message form field and rendered an input field and a button to the screen. We also discussed the concept of jQuery and used that to select and create incoming message elements.
In the geoloaction section, we gave a new button to the user. This new button allow the users to send their location. We set up a click
listener for that Send Location
button, which means every time a user clicks it, we do something as per their access to geoloaction API. If they do not have access to the geolocation API, we simply print a message. If they do have access we try to fetch the location.
In the next chapter, we'll look into styling our chat page and make it look more like a real web app.