630
drawing lines, 476–478
drawing rectangles, 478–479
ordering fill and stroke method calls, 479–481
drawing with HTML5
configuring drawing state, 465–474
described, 459
drawing arcs, 481–487
drawing rectangles, 463–464
drawing text, 488–490
drawing using paths, 475–487
drawing with images, 490–494
implementing the canvas, 462–463
lesson summary and review, 494–495, 501–
502, 506
practice exercises, 502–505
using <canvas> element, 460, 462–463
using CanvasRenderingContext2D object,
460–494
using scalable vector graphics, 495–501
drawing with images, 490–494
drop event, 119, 511–515
dropItem() function, 512, 515, 519
<dt> element, 33, 223
durationchange event, 119
E
ECMA-262 specification, 66
ECMAScript, 66
element type selectors, 146
elements
adding attributes to, 35–36
adding comments, 39–40
described, 32–35
expando attributes, 39
floating, 186–189
HTML5 global attribute reference, 37
inherit value, 163
inheriting styles, 162–163
navigating, 112–114
preventing default operation, 116
<script> elements and, 103
this keyword, 117
working with events, 114–120
dot notation, 586
double quotes ("), 41, 69
downloading event, 610
drag and drop operation
DataTransfer object, 513–515
described, 507
dragging process, 509–510
File API, 517–521
lesson summary and review, 516–517, 521–522,
536–537
practice exercises, 522–535
technique illustrated, 508–509
drag event, 119, 510
dragend event, 119, 510–511
dragenter event, 119, 511–513
draggable global attribute, 37, 509–510
draggingEnded() function, 511
dragleave event, 119, 511
dragover event, 119, 511–513
dragstart event, 119, 510–511, 513
drawing arcs
using arc() method, 485–487
using arcTo() method, 481–485
drawing circles, 485–487, 498–499
drawing curved lines, 481–487
drawing state
configuring, 465–474
saving and restoring, 474–475
drawing text, 488–490
drawing triangles, 478–481
drawing using paths
creating shapes, 475
described, 475
drawing arcs with arc method, 485–487
drawing arcs with arcTo method, 481–485
dot notation