Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 1: Communicating by using WebSocket CHAPTER 10 419 function onError(evt) { writeOutput('ERROR: ' + evt.data); } In this e ...
420 CHAPTER 10 WebSocket communications When the webpage is displayed using Internet Explorer 10, a message is displayed stating ...
Lesson 1: Communicating by using WebSocket CHAPTER 10 421 function writeOutput(message) { var output = $("#divOutput"); output.h ...
422 CHAPTER 10 WebSocket communications function onClose(evt) { cancelKeepAlive(); writeOutput("DISCONNECTED"); } function onMes ...
Lesson 1: Communicating by using WebSocket CHAPTER 10 423 Quick check ■■Do the WebSocket protocol and WebSocket API provide nati ...
424 CHAPTER 10 WebSocket communications Socket.IO has a client-side and server-side library; the client side uses JavaScript, an ...
Practice exercises CHAPTER 10 425 You want to ensure that the WebSocket connection is not disconnected as a result of inactivit ...
426 CHAPTER 10 WebSocket communications ■■Author: your name ■■License: BSD Open the package.json file and add a dependency on t ...
Practice exercises CHAPTER 10 427 Add a statement to map a request for the root to the index.html file (to be created in Exerci ...
428 CHAPTER 10 WebSocket communications The adduser event is triggered after the client makes a connection. It adds the username ...
Practice exercises CHAPTER 10 429 Test your work by running the website, using the following command in the command prompt wind ...
430 CHAPTER 10 WebSocket communications Click Install to install jQuery. FIGURE 10-3 he NuGet Window with jQuery selectedT Add ...
Practice exercises CHAPTER 10 431 Now that you have all the files you need, it’s time to add your code. In the Index.html file, ...
432 CHAPTER 10 WebSocket communications Open the default.js file. To get IntelliSense, from the Solution Explorer window, drag ...
Practice exercises CHAPTER 10 433 Add the updateUserList function. This function is called when the chat service sends an updat ...
434 CHAPTER 10 WebSocket communications function addUser() { socket.emit('adduser', prompt("What's your name?")); } function pro ...
Suggested practice exercises CHAPTER 10 435 FIGURE 10-5 he chat client in actionT Suggested practice exercises The following add ...
436 CHAPTER 10 WebSocket communications Answers This section contains the answers to the lesson review questions in this chapter ...
437 Chapter 11 HTML5 supports multimedia CHAPTER 11 HTML5 supports multimedia O ne of the most popular features of HTML5 is its ...
438 CHAPTER 11 HTML5 supports multimedia Video formats The W3C is trying to come up with a video format that can be specified fo ...
«
18
19
20
21
22
23
24
25
26
27
»
Free download pdf