MANNING
Rob Crowther
Joe Lennon
Ash Blue
Greg Wanish
FOREWORD BY Christian Heilmann
IN ACTION
HTML5 in Action
ROB CROWTHER
JOE LENNON
ASH BLUE
GREG WANISH
MANNING
S
HELTER
I
SLAND
Download from Wow! eBook <www.wowebook.com>
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 261
Shelter Island, NY 11964
Email: orders@manning.com
©2014 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form or by means electronic, mechanical, photocopying, or otherwise, without prior written
permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial caps
or all caps.
Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of
elemental chlorine.
Manning Publications Co. Development editor: Renae Gregoire
20 Baldwin Road Copyeditor: Tiffany Taylor
PO Box 261 Proofreader: Elizabeth Martin
Shelter Island, NY 11964 Typesetter: Dennis Dalinnik
Cover designer: Marija Tudor
ISBN: 9781617290497
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – MAL – 19 18 17 16 15 14
Download from Wow! eBook <www.wowebook.com>
iii
brief contents
P
ART
1 I
NTRODUCTION
. ..........................................................1
1
■
HTML5: from documents to applications 3
P
ART
2 B
ROWSER
-
BASED
APPS
..................................................35
2
■
Form creation: input widgets, data binding,
and data validation 37
3
■
File editing and management: rich formatting, file storage,
drag and drop 71
4
■
Messaging: communicating to and from scripts in HTML5 101
5
■
Mobile applications: client storage and offline execution 131
P
ART
3 I
NTERACTIVE
GRAPHICS
,
MEDIA
,
AND
GAMING
............163
6
■
2D Canvas: low-level, 2D graphics rendering 165
7
■
SVG: responsive in-browser graphics 199
8
■
Video and audio: playing media in the browser 237
9
■
WebGL: 3D application development 267
Download from Wow! eBook <www.wowebook.com>
Download from Wow! eBook <www.wowebook.com>