Skip to Content
HTML5 in Action
book

HTML5 in Action

by Greg Wanish, Rob Crowther, Joe Lennon, Charles Brindle
February 2014
Intermediate to advanced
466 pages
16h
English
Manning Publications
Content preview from HTML5 in Action

Chapter 4. Messaging: communicating to and from scripts in HTML5

Chapter 4 at a glance

Topic

Description, methods, and so on

Page

Server-sent events Creating events in the browser from the server:  
 
  • Creating an EventSource()
111
 
  • Listening to server events with addEventListener()
111
WebSockets Two-way, event-driven communication:  
 
  • Writing applications using WebSockets
116
 
  • Messaging on the client side
125
Cross-document messaging Communication between scripts in different windows:  
 
  • Sending messages with postMessage()
126
 
  • Receiving messages with onmessage()
126

Look for this icon throughout the chapter to quickly locate the topics outlined in this table.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML5 Programmer’s Reference

HTML5 Programmer’s Reference

Jonathan Reid

Publisher Resources

ISBN: 9781617290497Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link