25.02.2013 Views

Peter Lubbers - Pro HTML 5 Programming

Pro HTML 5 Programming

Pro HTML 5 Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

284<br />

■ INDEX<br />

stopping Web Workers, 198<br />

timers, 199<br />

within Web Workers, 198<br />

WebGL, 260–262<br />

WebSocket API, 3, 137–167, 230<br />

browser support for, 154<br />

building application with, 158–167<br />

adding Geolocation code, 162<br />

adding WebSocket code, 161–162<br />

coding <strong>HTML</strong> file, 159–161<br />

final code, 164–167<br />

putting all together, 162–164<br />

compared with polling, 143<br />

echo server, 146–153<br />

handshake, 140<br />

interface, 141<br />

overview, 137–144<br />

protocol, 140<br />

reduction in network traffic and latency<br />

using, 142–144<br />

server implementations, 147<br />

using, 154–158<br />

adding event listeners, 155<br />

creating WebSocket object and<br />

connecting to WebSocket server,<br />

155<br />

running WebSocket page, 156–158<br />

sending messages, 155–156<br />

WebSocketConnection, 148<br />

width attribute, 77<br />

Wi-Fi–based geolocation data, 90<br />

willValidate attribute, 183<br />

window object, 219<br />

window.applicationCache, 250<br />

window.applicationCache.status, 248<br />

window.JSON, 21<br />

window.openDatabase() function, 236<br />

window.orientation property, 264<br />

window.WebSocket command, 154<br />

World Wide Web Consortium (W3C), 1, 3<br />

■ X<br />

XForms, 170<br />

XMLHttpRequest, 126, 141<br />

XMLHttpRequest Level 2, 126–135<br />

application in action, 134–135<br />

browser support, 129<br />

code for application, 132<br />

cross-origin communication, 126–128<br />

progress events, 128<br />

using, 129–131<br />

building application, 131–132<br />

making cross-origin requests, 130<br />

progress events, 130<br />

■ Z<br />

Z-order, 53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!