for/each loop defined in E4X, 286 insertion and deletion methods, 953 Java classes and objects with for/in loop, jQuery( ) function ($( )), 525–528 292 names of functions and methods in official language extensions for, 274–282 documentation, 528 array comprehensions, 280 obtaining, 525 for/each loop, 274 queries and query results, 528 generator expressions, 281 selection methods, 578–582, 948 generators, 277–280 selector grammar, 946 iterators, 274–277 selectors, 574–578 Iterator ( ) function, 276 combinations of, 577 __iterator__( ) method, 276 groups of, 578 simple, 575–577 J terminology, 527 Java UI library, 585 utility functions, 571–574, 960 browser plug-ins, 336 jquery property, 529 scripting with Rhino, 290–296 jQuery.easing object, 556 GUI (graphical user interface) example, jQuery.fx.speeds, 551 293–296 jqXHR object, 565 Java-style classes in JavaScript, 205–208 JSON, 138, 786–789 javaEnabled( ), Navigator object, 348 jQuery.getJSON( ) function, 561 javaException property, Error object, 293 jQuery.parseJSON( ) function, 573 JavaScript making HTTP POST request with JSON- files ending in .js, 313 encoded body, 504 names and versions, 2 methods, implementation in classes, 220 versions, 265, 269 parsing HTTP response, 500 JavaScript Object Notation (see JSON) toJSON( ) method, 139 javascript: URLs, 315 JSON.parse( ) function, 138, 786 using for bookmarklets, 316 JSON.stringify( ) function, 138, 672, 788 join( ) method, Array object, 149, 728 JSONP, 513–515 jQuery, 11, 338, 523–586, 582–585, 945–962 making request with script element, 515 Ajax functions, 958 request specified by URL or data string Ajax in jQuery 1.5, 565 passed to jQuery.getJSON( ), 563 Ajax with, 559–571 jump statements, 87, 102 Ajax events, 570 break, 103 ajax( ) function, 564–569 continue, 104 load( ) method, 559 labeled, 102 passing data to Ajax utilities, 562 return, 105 utility functions, 560 throw, 106 altering document structure, 537–540 try/catch/finally, 106 animated effects, 551–558 basic methods and properties, 947 basics of, 524 K CSS selector-based queries, 370 key events, 452 effects and animation methods, 956 key property, 485 element methods, 950 Event object, 454, 920 event methods, 955 StorageEvent object, 988 extending with plugins, 582–585 key( ) method, Storage object, 988 getters and setters, 531–537 keyboard events, 484–489 handling events with, 540–550 event handler registration with jQuery, 541 1050 | Index
keydown and keyup, 485 determining, 38 Keymap class for keyboard shortcuts length property (example), 485–489 Arguments object, 172, 721 text input, 481 Array object, 730 keyboard modifier keys for mouse events, 451, arrays, 143 467 manipulating, 145 keyboard, using instead of a mouse, 332 sparse arrays, 144 KeyboardEvent objects, 453 Comment node, 881 keyCode property, 481, 485 CSSStyleDeclaration object, 886 Event object, 917 DOMTokenList object, 902 keyIdentifier property, 485 Form object, 928 Keymap class for keyboard shortcuts Function object, 780 (example), 485–489 functions, 186 keys( ) function, 821 History object, 936 enumerating property names, 128 HTMLCollection object, 937 keys( ) method, ConsoleCommandLine, 884 HTMLOptionsCollection object, 938 keywords, case sensitivity, 21 jQuery objects, 528 Koch snowflakes, drawing (example), 641 NodeList object, 980 Select element, 986 L Storage object, 987 Label object, 962 String object, 38, 842 Text node, 993 label property, Option object, 980 TimeRanges object, 995 labeled statements, 102 TypedArray object, 997 continue, 104 Window object, 357, 1002 labels property lengthComputable, ProgressEvent object, 984 FormControl object, 930 let keyword, 269 Meter object, 973 destructuring assignment used to initialize Progress object, 983 variables, 272 lang property, Element object, 904 used as loop initializer, 270 lastChild property, Node object, 976 using as variable declaration, 270 lastElementChild, Element object, 373, 905 lexical scoping, 31, 55, 180 lastEventId, MessageEvent object, 971 and functions shared between frames or lastIndex property, RegExp object, 262, 833 windows, 358 lastIndexOf( ) method rules for nested functions, 181 Array object, 157, 729 libraries String object, 841 client-side, supporting visual effects, 435 lastModified property, Document object, 405, compatibility, 328 893 history management, 346 lastModifiedDate, File object, 693, 923 lifecycle notification events, 455 latitude property, Geocoordinates object, 933 line breaks left and top style properties, 421, 425 interpreted as semicolon, exceptions, 26 left, right, top, and bottom properties, 392 in JavaScript code, 22 ClientRect object, 880 treatment as semicolons in JavaScript, 25 legacy event types, 449 linear gradients, 647, 874 form events, 450 lineCap property, 650 key events, 452 lineCap property, mouse events, 451 CanvasRenderingContext2D, 649, window events, 450 871 length of a string, 36 Index | 1051
lineCap, CanvasRenderingContext2D, 868 loaded property, ProgressEvent, 508, 984 lineJoin, CanvasRenderingContext2D, 650, loading and executing scripts asynchronously, 868, 872 319 lineno property, ErrorEvent object, 913 loan calculator web application (example), 12– lines 18 drawing in Canvas API, 632–635 local files and XMLHttpRequest, 495 line drawing attributes in canvas, 648 locale property, Event object, 920 lineTo( ), CanvasRenderingContext2D, 632, localeCompare( ) method, String object, 842 641, 649, 877 localName property, Attr object, 862 lineWidth property, localName property, Element object, 905 CanvasRenderingContext2D, 635, localStorage property, Window objects, 589, 648 1002 lineWidth, CanvasRenderingContext2D, 868, offline web applications, 608 872 storage API, 591 <link> elements, Element objects representing, storage events, 592 440 storage lifetime and scope, 590 links Location object, 343, 964 Link object, 962 assign( ) and replace( ) methods, 344 requesting details about with HTTP HEAD hash property, 672 and CORS, 512 href property, 343 links property, Document object, 367, 893 reload( ) method, 344 list property, Input object, 943 URL decomposition properties, 343 lists, filtering in E4X, 285 location property literals, 58 Document object, 343, 405, 893 defined, 23 Event object, 920 numeric, 31 Window object, 307, 343, 1002 object, 117 WorkerGlobalScope object, 683, 1009 regular expression, 251 log( ) function, Math object, 796 string, 36 log( ) method, Console object, 686, 883 XML literals included in JavaScript code, LOG10E constant (Math), 796 284 LOG2E constant (Math), 796 little-endian byte ordering, 690, 890 logical expressions, 75 live events, 549 logical AND (&&) operator, 75 live( ) method, jQuery, 550 logical NOT (!) operator, 77 LN10 constant (Math), 795 logical OR (||) operator, 76 LN2 constant (Math), 795 logical operators, 62 load events, 318, 450 long-running scripts, 338 browser support for, 324 longitude property, Geocoordinates object, document, 465–467 933 event propagation, 463 lookahead assertions in regular expressions, FileReader object, 698 258 onload event handler, Window object, 309 __lookupGetter__( ) and __lookupSetter__( ) registering event handler for, 11 methods, 134 load( ) function (Rhino), 290 lookupNamespaceURI( ), Node object, 979 load( ) method lookupPrefix( ) method, Node object, 979 Ajax utility in jQuery, 559 loop property, MediaElement object, 618, 967 jQuery, 541 loops, 87, 97 media elements, 617 continue statements in, 104 MediaElement object, 969 do/while, 98 1052 | Index
for, 98 sin( ) function, 799 for/each, 274 sqrt( ) function, 799 let keyword as variable declaration or loop static functions, 790 initializer, 270 tan( ) function, 800 while, 97 max property low property, Meter object, 973 Input object, 943 lvalues, 64, 100 Meter object, 973 Progress object, 983 M max( ) function, Math object, 187, 797 m (multiline mode) in regular expression max-age attribute, cookies, 596 maximumAge option, Geolocation methods, pattern matching, 259 934 makeArray( ) function, 573 maxLength property, Input object, 943 malicious scripts, containment with same- MAX_VALUE (Number), 803 origin policy, 334 measureText( ), CanvasRenderingContext2D, manifest files, application cache, 601 651, 877 complex manifests, 603 media updates, 603–607 controlling playback, 617 map( ) function, 573 events, 620 map( ) method querying status, 618 Array and jQuery, 530 scripting audio and video, 615 Array object, 154, 192, 730 type selection and loading, 617 map, displaying using geolocation, 669 media property margin property, 416, 432 CSSStyleSheet object, 887 margins Style object, 989 in CSS box model, 424 MediaElement object, 965–970 specifying for elements with CSS, 423 constants defining values for networkState match position, specifying for regular and readyState, 965 expressions, 257 event handlers, 968 match( ) method, String object, 260, 843 methods, 969 Math object, 789–800 properties, 966 abs( ) function, 791 MediaError object, 970 acos( ) function, 791 memoization, 196 asin( ) function, 792 merge( ) function, 573 atan( ) function, 792 message property atan2( ) function, 792 Error object, 769, 771 ceil( ) function, 793 ErrorEvent object, 913 constants, 789 EvalError object, 774 cos( ) function, 794 GeolocationError object, 935 exp( ) function, 794 ReferenceError object, 829 floor( ) function, 795 URIError object, 856 functions and constants defined as MessageChannel object, 684, 970 properties, 33 MessageEvent object, 971 log( ) function, 796 MessagePort object, 684, 972 max( ) function, 187 messaging max( ) method, 797 cross-document, 336, 676–680 min( ) function, 797 message event used for asynchronous pow( ) function, 798 communication, 455 random( ) function, 798 round( ) function, 798 Index | 1053
sending data to Worker objects with MIN_VALUE (Number), 803 postMessage( ), 681 miterLimit property, 650, 872 support by WebSocket API, 714 mobile devices, events, 448, 456 metadata affecting media playback, 618 modal dialog boxes, 349 metaKey property, 451, 467, 485 (see also dialog boxes) Event object, 917 modules, 246–250 in jQuery, 543 evaluation of, 302 Meter object, 973 function scope as private namespace, 248– method attribute and property, form elements, 250 399 objects as namespaces, 246 method chaining, 169 monitorEvents( ), ConsoleCommandLine from subclass to superclass, 231–233 object, 884 method property, Form object, 928 motion blur or smear effect on graphics in methods, 30, 43, 163 canvas, 661 adding to prototype objects for classes, 208 mouse array coordinates of pointer, 390 ECMAScript 3, 148–152 two-dimensional mouse wheels and wheel ECMAScript 3 and ECMAScript 5, 159 event, 453 ECMAScript 5, 153–157 using keyboard instead of, 332 borrowing, 224 mouse events, 451, 467–471 class, 199 default actions that can be prevented, 467 common object methods, 138 DOM Level 3 Events specification, 453 toJSON( ), 139 registering event handlers with jQuery, 540 toLocaleString( ), 139 testing if event is over painted pixel in toString( ), 139 canvas, 663 valueOf( ), 140 testing whether event is over current path in comparison, 221–224 canvas, 662 defined, 7 mousewheel events, 452, 453, 471–475 invocation expressions, 61 handling, 472–475 invoking, 167 working with, interoperably, 472 Java, invoking with JavaScript programs in moveTo( ), CanvasRenderingContext2D, 632, Rhino, 291 877 jQuery, 528 Mozilla special, restriction in secure subsets, 267 downloading Rhino from, 290 type conversion, 219 JavaScript versions, 265, 269 Microsoft Web Sandbox, 269 multidimensional arrays, 148 MIME types multiline property, RegExp object, 262, 830 application cache manifest files, 602 multipart/form-data HTTP requests, 506 form data encoding, 502 multiple property media, 617 Input object, 944 overriding incorrect type in HTTP response, Select element, 986 501 mutable types, 31 specifying in HTTP Content-Type headers, muted property 496 MediaElement object, 967 text, 500 setting for audio playback, 618 min property Input object, 943 N Meter object, 973 min( ) function, Math object, 797 \n (newline character), 37 name attribute, HTML elements, 352, 399 1054 | Index
selecting elements by name, 365 NaN (not-a-number), 34, 800 setting, creating properties on Document equality comparisons and, 34 object, 366 isNaN( ) function, 785 name property Number.NaN, 803 Attr object, 862 native objects, 116 DocumentType object, 899 naturalHeight and naturalWidth properties, DOMException object, 900 Image object, 941 Error object, 770, 771 Navigator object, 330, 346, 974 EvalError object, 774 browser sniffing properties, 346 File object, 693, 924 cookieEnabled property, 594 form elements, 400 geolocation property, 668 Form object, 928 miscellaneous properties and methods, 348 FormControl object, 930 onLine property, 608 IFrame object, 939 navigator property ReferenceError object, 829 Window object, 346, 1003 URIError object, 856 WorkerGlobalScope object, 683, 1009 Window object, 354, 1003 negative infinity, 33, 804 namedItem( ) method negative lookahead assertions in regular HTMLCollection object, 368, 937 expressions, 258 HTMLOptionsCollection object, 939 negative zero value, 33 Select element, 987 equality comparisons to positive zero, 34 names nested functions, 166, 309 CSS properties in JavaScript, 431 NETWORK section, application cache of functions, 165 manifest, 603 window name, importance of, 354 networking namespace URI property, Attr object, 862 client-side JavaScript and, 333 namespaces TCP-based, net module in Node, 300 createElementNS( ) method, 382 networkState, MediaElement object, 620, 965, createElementNS( ) method, Document, 967 895 new keyword function scope as private namespace, in instantiating Java classes, 291 modules, 248–250 preceding object creation expressions, 61 functions as, 178–180 new operator getAttributeNS( ), Element object, 907 constructor invocation with, 202 getElementsByTagNameNS( ) method, 896 creating objects, 117 isDefaultNamespace( ), Node object, 978 newURL property, HashChangeEvent object, jQuery, 527 935 jQuery plug-in binding event handlers, 584 newValue property, StorageEvent object, 988 lookupPrefix( ), Node object, 979 next( ) and prev( ) methods, jQuery, 581 namespaceURI property, Element object, next( ) method 905 generators, 278 objects as, 246 iterators, 275 process namespace, Node, 297 nextAll( ) and prevAll( ) methods, jQuery, 581 specifying for event handlers with jQuery, nextElementSibling, Element object, 373, 905 545 nextSibling property, Node object, 371, 976 SVG, 627 nextUntil( ) and prevUntil( ) methods, jQuery, XML documents including attributes from 581 other namespaces, 377 noConflict( ) function, 527, 583 XML, working with in E4X, 286 Node interpreter, 289 Index | 1055
chat server using WebSockets and, 715 not( ) method, jQuery, 579 online documentation, 296 not-a-number (see NaN) scripting asynchronous I/O with, 296–304 noValidate property, Form object, 929 buffers, 298 now( ) method, Date object, 752 client-side timer functions, 297 null values, 29, 41 event emitters, 297 properties with, access errors, 123 file and filesystem API in fs module, 299 property access expressions and, 60 functions, 296 Number object, 801–808 HTTP client utilities module (example), constants, 801 302–304 MAX_VALUE, 802 HTTP server (example), 300–302 methods, 801 streams, 298 MIN_VALUE, 803 TCP-based networking, 300 NaN, 803 Node object, 975–979 NEGATIVE_INFINITY, 803 appendChild( ) method, 383 POSITIVE_INFINITY, 804 attributes property, 378 read-only values for Infinity and NaN global cloneNode( ) method, 382 variables, 34 constants, possible values of nodeType toExponential( ) method, 804 property, 976 toFixed( ) method, 805 constants, return value of toLocaleString( ) method, 806 compareDocumentPosition( ), toPrecision( ) method, 806 976 toString( ) method, 48, 807 documents as trees of, 371 valueOf( ) method, 808 insertBefore( ) method, 383 Number( ) constructor, 43, 801 methods, 977 Number( ) function, type conversions with, 47 properties, 976 numbers, 31–36 removeChild( ) method, 384 arithmetic in JavaScript, 33 replaceChild( ) method, 384 binary floating-point and rounding errors, textContent property, 380 34 NodeList object, 365, 896, 979 conversions, 45, 47 overview of, 367 number-to-string, 48 returned by getElementsByTagName( ), object-to-number, 49, 51 366 dates and times, 35 nodeName property, Node object, 372, 976 defining a complex number class (example), nodes, 363 206 creating, inserting, and deleting in floating-point literals, 32 documents, 382–387 integer literals, 32 creating nodes, 382 wrapper objects, 43 inserting nodes, 382, 383 numeric literals, 31 removing and replacing nodes, 384 numeric types, 29 using DocumentFragments, 385 nodeType property, Node object, 371, 977 O nodeValue property, Node object, 372, 381, 977 Object class, 75, 808–826 nonzero winding rule, 635 constructor property, 809, 811 normalization create( ) function, 118, 133, 811 normalized, defined, 995 defineProperties( ) function, 132, 812 Unicode encodings, 23 defineProperty( ) function, 101, 132, 134, normalize( ) method, Node object, 979 145, 813 freeze( ) function, 137, 814 1056 | Index
getOwnPropertyDescriptor( ) function, 131, callable, 191 134, 815 conversion to primitives, 49–52 getOwnPropertyNames( ) function, 128, conversion to strings, 672 816 conversion to strings for Ajax, 559 getPrototypeOf( ) function, 135, 817 conversions, 45 hasOwnProperty( ) method, 125, 817 creating, 116–119 isExtensible( ) function, 137, 818 using new operator, 117 isFrozen( ) function, 137, 819 using object literals, 117 isPrototypeOf( ) method, 135, 819 using Object.create( ) function, 118 isSealed( ) function, 820 using prototypes, 118 keys( ) function, 128, 821 deleting properties, 124 methods, 138, 809 determining class of, 210 preventExtensions( ) function, 137, 821 using constructor name as class propertyIsEnumerable( ) method, 125, 822 identifier, 211 prototype property, 118 using constructor property, 211 seal( ) function, 137, 823 using duck-typing, 213 static methods, 809 using instanceof operator, 210 toLocaleString( ) method, 139, 823 enumerating properties, 126–128 toString( ) method, 139, 824 form-encoding properties for HTTP valueOf( ) method, 140, 825 request, 502 object creation expressions, 61 global object, 42 object databases, 705 initializers, 58 <object> elements, 537 instanceof operator, 75 displaying SVG images, 622 iterable, 275 object literals, 117 iterating through properties with object types, 29 jQuery.each( ) function, 572 Object( ) function, type conversions with, 47 Java, querying and setting fields in Rhino, object-oriented programming 291 favoring composition over inheritance, 233 jQuery, 527 separating interface from implementation, methods, 7, 163 234 universal, 138 strongly typed languages, 199 mutable object references, 44 object-oriented techniques in JavaScript, 215 properties, 115 borrowing methods, 224 property access expressions, 60 constructor overloading and factory property attributes, 131–134 methods, 227 property getters and setters, 128–130 emulating private instance fields, 226 querying and setting properties, 120–124 enumerated types (example), 217–219 inheritance and, 122 implementing comparison methods in objects as associative arrays, 120 classes, 221–224 property access errors, 123 Set class (example), 215–217 serializing, 138 standard conversion methods, 219 structured clones of, 672 objects, 5, 115–140 testing properties, 125 array-like, 158 wrapper, 43 arrays of, 141 XML, 284 attributes of, 116, 135–138 octal values, 32 class attribute, 136 offline web applications, 588, 608–612 extensible attribute, 137 application storage and, 601 prototype attribute, 135 events, 455 Index | 1057
offset properties, document elements, 394 animating changes for fadeable elements, offset( ) method, jQuery, 534 435 offsetHeight and offsetWidth properties, open( ) method Element object, 394, 905 Document object, 897 offsetLeft and offsetTop properties, Element Window object, 354, 1006 object, 394, 905 javascript:URL as argument, 315 offsetParent property, Element object, 395, XMLHttpRequest object, 1015 905 opener property, Window object, 356, 1003 offsetParent( ) method, jQuery, 535 opening and closing tags of elements, 379 offsetX and offsetY properties, Event object, opening and closing windows, 354–356 917 closing windows, 356 oldURL property, HashChangeEvent object, OpenSocial API, 268 935 Opera, 455 oldValue property, StorageEvent object, 988 (see also web browsers) onbeforeunload event handler, windows, 462 current version, 327 onchange attribute, 315 global compositing approach, 659 onchange event handlers operating systems text fields, 403 drag-and-drop operations based on, 454 toggle buttons in forms, 402 web browsers as, 310 onclick event handlers, 316 operators, 5, 57, 62–66 button elements in forms, 401 + (addition or string concatenation) ondragstart event handler, 476 operator, 67 one( ) method, jQuery, 545 arithmetic, 66 onerror property assignment, 78 Window object, 351, 450 associativity, 65 setting to a function, 321 bitwise, 69 WorkerGlobalScope object, 683 comparison, 73 onhashchange property, Window object, 672 conditional (?:), 82 onLine property delete, 84 Navigator object, 348, 974 equality and inequality, 71 WorkerNavigator object, 1012 in, 74 onload event handlers, 318 instanceof, 75 in client-side script revealing content, 309 list of JavaScript operators, 62 in digital clock program, 312 logical AND (&&), 75 onload( ) function, defining (example), 322 logical NOT (!), 77 onmessage event handlers, 336 logical OR (||), 76 onmessage property, WorkerGlobalScope, lvalues, 64 682 number of operands, 64 onmousedown attribute, <div> element, 471 operand and result type, 64 onreadystatechange property, order of evaluation, 66 XMLHttpRequest object, 499, 1013, precedence, 65 1017 side effects, 64, 88 onreset event handlers, form elements, 400 typeof, 82 onstorage property, Window objects, 592 unary arithmetic operators, 68 onsubmit event handlers, form elements, 400 void, 85 ontimeout property, XMLHttpRequest object, optimum property, Meter object, 973 510 <option> elements, 938 opacity property, 428, 551 Option object, 404, 980 animating, 552, 556 options property, Select element, 986 1058 | Index
orientation property, Window object, 456 parent window, 354 orientationchanged event, 456 parent( ) and parents( ) methods, jQuery, 581 origin of a document, 334, 590 parentNode property, Node object, 371, 977 origin property, MessageEvent object, 677, parentRule property, CSSRule object, 885 971 parentStyleSheet property Origin: request header, 335 CSSRule object, 886 originalEvent property, Event object, 544 CSSStyleSheet object, 887 outerHeight and outerWidth properties, parentsUntil( ) method, jQuery, 581 Window object, 1003 parse( ) function, 138, 786 outerHTML property, Element object, 379, parse( ) method, Date object, 752 905 parseFloat( ) function, 49, 826 implementing using innerHTML, 384 parseInt( ) function, 49, 827 outerWidth( ) and outerHeight( ) methods, parseJSON( ) function, 573 jQuery, 535 partial application of functions, 188, 194–196 Output object, 981 path attribute, cookies, 594 overflow, 33 setting, 596 overflow property, 428, 451 pathname property overflowing content, scrollable elements in Link object, 963 documents, 396 Location object, 343, 965 overlapping translucent windows (CSS WorkerLocation object, 1012 example), 429–431 paths overloading constructors, 227 canvas, 631 overrideMimeType( ), XMLHttpRequest beginPath( ) method, 873 object, 501, 1016 closePath( ) method, 874 own properties, 116 creating and rendering, 867 ownerDocument property, Node object, 977 curved paths, 643 ownerNode property, CSSStyleSheet object, defining, 632 887 determining if point is on, 877 ownerRule property, CSSStyleSheet object, determining whether point is in, 635 887 line drawing attributes, 648 testing if mouse event is over current P path, 662 SVG, 627 padded-JSON (see JSONP) pattern matching, 39 padding (see also regular expressions) in CSS box model, 424 string methods for, 259 specifying for elements with CSS, 423 pattern property, Input object, 944 padding property, 416 patternMatch property, FormValidity object, PageTransitionEvent object, 981 932 pageX and pageY properties, Event object, patterns 917 fill or stroke using, 647, 867 in jQuery, 543 specifying for fill or stroke in canvas, 647 pageXOffset and pageYOffset properties, pause( ) method, MediaElement object, 617, Window object, 391, 1003 970 paragraph separators, 22 paused property, MediaElement object, 967 param( ) function, 562 period (.) (see . (dot), under Symbols) parameters (function), 163, 171 persisted property, PageTransitionEvent optional, 171 object, 982 parent property, 356 persistent filesystem, 700 Window object, 1003 Index | 1059
PI constant (Math), 797 document and element geometry and pie chart, drawing with JavaScript and SVG, scrolling, 390–396 624–627 getting and setting element geometry in pipeline of generators, 279 jQuery, 534 pixelDepth property, Screen object, 984 handling mousewheel events (example), pixels 472–475 compositing in canvas, 657–660, 869 using CSS, 420–423 enlarged withdrawImage( ) in canvas, 656 positive infinity, 33, 804 manipulation in canvas, 661–662, 870 positive lookahead assertions in regular testing if mouse event is over painted pixel expressions, 258 in canvas, 663 POSIX (Unix) API, use in Node, 289 placeholder attribute, text fields, 402 POST method, 496 placeholder property, Input object, 944 encoding HTTP request body with XML platform property document, 504 Navigator object, 347, 974 file upload with HTTP request, 505 WorkerNavigator object, 1012 making HTTP request with form-encoded play( ) method, MediaElement object, 617, data, 503 970 making HTTP request with JSON-encoded playbackRate property, MediaElement object, body, 504 618, 967 posting plain text to a server, 497 played property, MediaElement object, 619, request body, 497 967 post( ) function, 563 plug-ins poster property, Video object, 998 scripting in browsers, security implications, postMessage( ) method 336 MessagePort object, 972 plugins property Window object, 336, 677, 1006 Document object, 893 Twitter search gadget controlled by, HTMLDocument object, 367 678–680 PNG image format, canvas content returned in, Worker object, 681, 1008 656 WorkerGlobalScope object, 1010 point, determining element at, 393 pow( ) function, Math object, 798 polygons, drawing with Canvas methods, 633 precedence, operator, 65 pop ups, blocking by browsers, 355 precision for numbers, 807 pop( ) method, Array object, 151, 731 prefix property popstate events, 672 Attr object, 862 PopStateEvent object, 982 Element object, 905 port property preload property, MediaElement object, 618, Link object, 963 967 Location object, 343, 965 prepend( ) method, jQuery, 538 WorkerLocation object, 1012 prependTo( ) method, jQuery, 538 port1 and port2 properties, MessageChannel prev( ) method, jQuery, 581 object, 971 prevAll( ) method, jQuery, 581 ports property, MessageEvent object, 971 preventDefault( ) method, Event object, 464, position property, 420 548, 919 Progress object, 983 preventExtensions( ) function, 137, 821 position( ) method, jQuery, 535 previousElementSibling, Element object, 373, positioning elements 905 CSS box model, 424 previousSibling property, Node object, 371, CSS example, shadowed text, 422 977 1060 | Index
prevUntil( ) method, 581 naming convention, 321 primary expressions, 57 form and form element, 399 primitive types, 29 function, 186 conversion of JavaScript primitives to Java, Function object, defining your own, 178 290, 293 functions assigned to, 176 conversions to other types, 46 getters and setters, 128–130 immutable primitive values and mutable global, 781 object references, 44 HTMLElement, mirroring HTML element object to primitive conversions, 49–52 attributes, 375 print( ) function (Rhino), 290 important CSS style properties, 419 print( ) method, Window object, 1006 inherited, checking for, 817 printing iterating through, with for/in loops, 100 beforeprint and afterprint events, 455 enumeration order, 101 defining jQuery.fn.println( ) function, 583 making nonenumerable, 238 private properties, 208 names and values, 117 emulating private instance fields in naming conventions for CSS properties in JavaScript, 226 JavaScript, 431 procedures, 166 nonstandard CSS properties, 416 processData option, 562 Object.defineProperties( ) method, 812 ProcessImageInstruction object, 982 private, in Java-style classes, 208 ProcessingInstruction object, creating, 895 property names versus array indexes, 143 profile( ) method prototype, inheritance of, 118 Console object, 883 querying and setting, 120–124 ConsoleCommandLine object, 884 access errors, 123 profileEnd( ) method inherited properties, 122 Console object, 883 objects as associative arrays, 120 ConsoleCommandLine object, 884 shortcut properties in CSS, 416 programs, JavaScript, 317 special, restriction in secure subsets, 267 progress events, 455, 498, 507–510 testing, 125 HTTP, 507 using as function arguments, 174 upload, 508 variables as, 55 XMLHttpRequest Level 2 (XHR2), 1017 property access expressions, 60 Progress object, 982 method invocations, 168 ProgressEvent object, 983 precedence, 65 prompt( ) method, Window object, 348, 1006 property descriptors, 131, 815 propagation of events (see events, event ECMAScript 5 properties utilities, 244–246 propagation) getting for named property of an object, properties 131 attributes of, 116, 131–134 utility functions for, 239 class, 199 propertyIsEnumerable( ) method, 125, 822 computed style, 436 __proto__ property, 136 converting HTML attribute names to, 376 protocol property CSS style properties, 414 Link object, 963 dataset attributes converted to, 377 Location object, 343, 965 defined, 115 WebSocket object, 714, 1000 deleting, 124 WorkerLocation object, 1012 enumerating, 126–128 prototype attribute, 135 event handler, 457 prototype chain, 118 mirroring HTML attributes, 315 Index | 1061
Prototype framework, Scriptaculous library, queryCommandIndeterminate( ), Document 435 object, 897 Prototype library, 338 queryCommandState( ), Document object, prototype property 410, 897 Function object, 780 queryCommandSupported( ), Document functions, 186 object, 410, 897 restrictions in secure subsets, 267 queryCommandValue( ), Document object, prototypes, 118, 205, 384, 811 897 adding methods to augment classes querySelector( ) method, 370 inheriting from, 208 Document object, 897 Array.prototype, 141 Element object, 908 classes and, 200 querySelectorAll( ) method, 370 constructor function, 203 Document object, 440, 898 constructor property and, 204 $( ) function versus, 529 constructor, used as prototype of new Element object, 908 object, 201 selecting form elements, 398 defined, 116 queue( ) method, jQuery, 558 duck-typing and, 213 queues, jQuery animation, 552 inheritance and, 115 canceling, delaying, and queuing effects, jQuery.fn, 583 557 making nonextensible, 242 queue property, animation options object, in multiple, interacting windows, 359 555 Object.getPrototypeOf( ) method, 817 quirks mode, 330, 425 Object.isPrototypeOf( ) method, 819 HTML document display, 369 proper initialization, key to subclassing, quotation marks (see under Symbols section) 229 testing prototype chain of an object, 210 R proxy objects, 359 proxy( ) function, 573 radial gradients, 647, 875 pseudo-class filters, 584 radians, specifying for angles in Canvas API, publicId property, DocumentType object, 899 638 push buttons, 401 <radio> elements, 402 push( ) method, Array object, 151, 731 random( ) function, Math object, 798 adding elements to end of array, 145 Range object, 408 pushStack( ) method, jQuery, 582 RangeError object, 828 pushState( ) method, History object, 672, 936 rangeOverflow property, FormValidity object, history management with (example), 673– 932 676 rangeUnderflow property, FormValidity PUT method, 609 object, 932 putImageData( ), read operations, 925 CanvasRenderingContext2D, 661, (see also FileReader object) 878 events triggered on XMLHttpRequest or FileReader, 455 Q readAsArrayBuffer( ) method FileReader object, 698, 699, 926 quadraticCurveTo( ), FileReaderSync object, 927 CanvasRenderingContext2D, 643, readAsBinaryString( ) method 878 FileReader object, 698, 926 queryCommandEnabled( ), Document object, FileReaderSync object, 927 410, 897 readAsDataURL( ) method 1062 | Index
FileReader object, 698, 926 deregistering event handlers with jQuery, FileReaderSync object, 927 546 readAsText( ) method for HTTP progress events, 507 FileReader object, 698, 926 for load and click events, 11 FileReaderSync object, 927 setting event handler attributes, 457 readOnly property, Input object, 944 setting event handler properties, 457 readyState property simple event handler registration with Document object, 323, 465, 894 jQuery, 540 EventSource object, 921 using addEventListener( ), 458 FileReader object, 698, 925 registerProtocolHandler( ), Navigator object, MediaElement object, 619, 965, 968 975 WebSocket object, 999 regular expressions, 39, 251–263 XMLHttpRequest object, 498, 1013 defining, 251 values, 498 alternation, grouping, and references, readystatechange events, 465, 499 256 Really Simple History (RSH) library, 346 character classes, 253 rect( ) method flags, 259 CanvasRenderingContext2D, 878 literal characters, 252 rect( ), CanvasRenderingContext2D, 645 repetition, 254 rectangles specifying match position, 257 clearRect( ) method, 874 RegExp objects, 261–263 ClientRect objects, 880 string methods using, 259–261 drawing in canvas, 645, 868 relatedTarget property, Event object, 452, 543, fillRect( ) method, 876 917 reduce( ) method, Array object, 155, 192, 732 relational databases, 705 reduceRight( ) method, Array object, 155, 733 relational expressions, 71 by reference, object comparisons, 45 comparison operators, 73 reference types, 45 equality and inequality operators, 71 ReferenceError objects, 56, 829 in operator, 74 references, 45 instanceof operator, 75 references to previous subexpression of regular relational operators, object-to-primitive expression, 256 conversions with, 51 referrer property, Document object, 405, 894 relative positioning of elements, 420 RegExp class, 30 relative URLs, 344 toString( ) method, 50 relative values for numeric properties' RegExp object, 39, 251, 261, 829–835 animation, 554 as callable object, 191 relLIst property, Link object, 963 exec( ) method, 262, 585, 831 reload( ) method, Location object, 344, 965 instance properties, 830 remove( ) method lastIndex property, 833 DOMTokenList object, 438, 902 properties, 262 jQuery, 540 source property, 833 Select element, 987 test( ) method, 263, 834 removeAttr( ) function, 531 toString( ) method, 834 removeAttribute( ), Element object, 377, 908 registerContentHandler( ), Navigator object, removeAttributeNS( ), Element object, 908 975 removeChild( ) method, Node object, 384, registering event handlers, 320, 457–460 979 advanced event handler registration with removeClass( ) method, jQuery, 532 jQuery, 544 removeData( ) method, jQuery, 536 Index | 1063
removeEventListener( ) method parsing response, 500 Document object, 459 responseType, XMLHttpRequest object, 1014 EventTarget object, 922 responseXML property, XMLHttpRequest Worker object, 681 objects, 501 WorkerGlobalScope object, 683 responseXML, XMLHttpRequest object, 500, removeItem( ) method, Storage object, 988 1014 repeat property, Event object, 920 restore( ), CanvasRenderingContext2D, 636, repetition in regular expressions, 254 878 nongreedy, 255 restricted features in browsers, 333 replace( ) method result property Location object, 344, 965 Event object, 542, 544 String object, 260, 844 FileReader object, 698, 925 replaceAll( ) method, jQuery, 538 return keyword, use by constructor functions, replaceChild( ) method, Node object, 384, 170 979 return statements, 61, 105, 166 replaceData( ) method line break interpreted as semicolon, 26 Comment node, 881 use by generator functions, 277 Text node, 993 return values replaceState( ) method, History object, 673, event handler, 462 937 jQuery event handler functions, 542 replaceWholeText( ), Text node, 994 setting returnValue property of event to replaceWith( ) method, jQuery, 537 false, 464 requests and responses (HTTP), 495 returnValue property aborting requests and timeouts, 510 BeforeUnloadEvent object, 863 decoding the response, 500 Event object, 464, 917 encoding request body, 502–507 Window object, 1003 getting onreadystatechange response, 499 reverse( ) method, Array object, 149, 734 order of request parts, 497 revokeObjectURL( ), method, URL object, response components, 498 998 specifying the request, 495 revokeObjectURL( ), URL object, 697 synchronous responses, 499 RGBA color space, 427 required property Rhino Input object, 944 JavaScript versions, 269 Select element, 986 scripting Java with, 290–296 reserved words, 24 GUI (graphical user interface) example, CSS properties having reserved word in 293–296 name, 432 support for E4X, 283 HTML attribute names, 376 support for JavaScript extensions, 265 primary expressions, 58 rich-text editing functionality, 410 using as property names, 117 right and bottom style properties, 421, 425 querying and accessing the properties, right property, ClientRect object, 880 120 right, left, top, and bottom properties, 392 reset( ) method, Form object, 400, 929 rollovers, image, 614 resize events, windows, 451 rotate( ), CanvasRenderingContext2D, 638, resize( ) method, jQuery, 541 878 response property, XMLHttpRequest object, rotation property, 456 1014 rotations, 641 responseText, XMLHttpRequest object, 501, round( ) function, Math object, 798 1014 1064 | Index
rounding errors, binary floating-point numbers variables as properties, 55 and, 35 variables defined with let keyword, 270 rowIndex property, TableRow object, 992 Worker threads, 682 rows property WorkerGlobalScope object, 1009 Table object, 990 scoped property, Style object, 989 TableSection object, 992 Screen object, 348, 984 rowSpan property, TableCell object, 991 screen property, Window object, 348, 1003 RSH (Really Simple History) library, 346 screen readers, 332 rules, style, 414, 885 screenX and screenY properties querying, inserting, and deleting in Event object, 917 stylesheets, 441 Window object, 1003 <script> elements, 309 S Ajax transport with, 492 \s (space) character in regular expressions, async and defer attributes, 319, 324 embedding JavaScript in HTML, 9, 312 254 HTTP by, JSONP, 513–515 Safari HTTP scripting with, 501 current version, 327 src attribute, 313 gesture and touch events on iPhone and text in, 381 iPad, 456 type attribute, 314 JavaScript in URLs, 316 Scriptaculous library, Prototype framework, mouse, two-dimensional trackball, 471 435 textInput event, 453 scripts same-origin policy, 334 in external files, 313 Canvas objects, toDataURL( ) method, 657 jQuery.getScript( ) function, 561 filesystems and, 700 Script object, 985 origin of a document, 590 synchronous, asynchronous, and deferred, preventing cookie swapping across sites, 318 595 type attribute, specifying MIME type, 314 relaxing, 335 scripts property, Document object, 367, 894 sandbox attribute, <iframe> element, 337 scroll offsets, 467 sandbox property, IFrame object, 939 scroll properties, document elements, 395 sandboxing systems, 267 scroll( ) method save( ), CanvasRenderingContext2D, 636, 879 jQuery, 541 Scalable Vector Graphics (see SVG) Window object, 394, 1006 scale property, 456 scrollbar positions of a window, 391 scale( ), CanvasRenderingContext2D, 638, scrollBy( ) method, Window object, 394, 1006 879 scrollHeight and scrollWidth properties, scope, variable, 31, 53–56 Element object, 906 closures, 180–185 scrolling, 394 cookies, 594 scroll events in windows, 451 event handler functions, 461 scrollIntoView( ) method, Element object, 394, function scope and hoisting, 54, 165 908 functions as namespaces, 178 scrollLeft and scrollTop properties, 391 IE userData, 600 Element object, 906 JavaScript functions and, 163 scrollLeft( ) method, jQuery, 536 nested functions, 166 scrollTo( ) method, Window object, 394, scope chain, 55 1006 sessionStorage, 592 scrollTop( ) method, jQuery, 536 storage scope, 589, 590 Index | 1065
seal( ) function, 137, 823 selectionEnd property sealed objects, 820 Input object, 944 seamless property, IFrame object, 940 TextArea object, 994 search property selectionRowIndex, TableRow object, 992 Link object, 963 selectionStart property Location object, 343, 965 Input object, 944 WorkerLocation object, 1012 TextArea object, 994 search( ) method, String object, 259, 845 selector property, jQuery objects, 529 secure attribute, cookies, 595, 596 selectors security, 333–338 CSS, 369, 414 client-side storage and, 589 for style rules, 441 cookie data and, 593 using to invoke jQuery( ) function, 526 cross-origin HTTP requests, 511 jQuery, 574–578, 946 cross-site scripting (XSS), 336 combinations of, 577 denial-of-service attacks, 338 filters for, 575–577 same-origin policy, 334 groups, 578 scripting plug-ins and ActiveX controls, selecting part of document to display with 336 jQuery, 559 scripts and, 513 Selectors API, 370 subsets for, 267 selectorText property, CSSRule object, 886 features removed, 267 self property listing of important subsets, 268 Window object, 1003 toDataURL( ) method, Canvas objects, 657 WorkerGlobalScope object, 683, 1009 what JavaScript can’t do, 333 self variable, using with nested functions, 169 seekable property, MediaElement object, 619, self-referential Window objects, 356 968 send( ) method seeking property, MediaElement object, 968 generators, 280 Select element, 403, 986 WebSocket object, 1000 select( ) method XMLHttpRequest object, 497, 1016 Input object, 945 serialize( ) method, 562 jQuery, 541 serializing objects, 138, 677 TextArea object, 995 example, JSON.stringify( ) function, 789 selected property, Option object, 404, 981 Server-Sent Events, 515–521 selected text, querying in a document, 407 custom chat server, 519 selectedIndex property emulating EventSource with HTMLOptionsCollection object, 938 XMLHttpRequest, 517–519 Select element, 404, 986 simple chat client using EventSource, 516 selectedOption property, Input object, 944 server-side JavaScript, 289–304 selectedOptions property, Select element, 987 asynchronous I/O with Node, 296–304 selecting document elements, 364–371 scripting Java with Rhino, 290–296 by CSS class, 368, 369 sessionStorage property, Window objects, 589, document.all[ ] collection, 371 1004 by id, 364 cookies versus, 594 by name, 365 storage API, 591 by type, 366 storage events, 592 selection methods in jQuery, 578–582, 948 storage lifetime and scope, 590 reverting to previous selection, 581 set( ) method, TypedArray object, 689, 997 using selection as context, 580 setAttribute( ) method, Element object, 908 Selection object, 408 1066 | Index
setAttributeNS( ) method, Element object, setVersion( ) method, IndexedDB objects, 707 909 setYear( ) method, Date object, 760 setCapture( ) method (IE), 468 seUint16( ) method, DataView object, 891 setCustomValidity( ), FormControl object, seUint18( ) method, DataView object, 891 931 seUint32( ) method, DataView object, 891 setData( ), DataTransfer object, 476, 889 shadowBlur property, 653, 872 setDate( ) method, Date object, 753 shadowColor property, 653, 872 setDragImage( ), DataTransfer object, 476, shadowed text, CSS positioning example, 422 889 shadowOffsetX and shadowOffsetY properties, setFloat32( ) method, DataView object, 890 653 setFloat64( ) method, DataView object, 891 shadowOffsetX and shadowOffsetY, setFullYear( ) method, Date object, 753 CanvasRenderingContext2D, 872 setHours( ) method, Date object, 754 shadows, drawing in canvas, 653, 869 setInt16( ) method, DataView object, 891 shaking an element side to side (animation setInt32( ) method, DataView object, 891 example), 433–435 setInt8( ) method, DataView object, 891 shared workers, 684 setInterval( ) function, 297, 322 shear transforms, 641 setInterval( ) method sheet property, Link object, 963 use in malicious code, 338 sheet property, Style object, 989 Window object, 342, 1007 shift( ) method, Array object, 146, 152, 734 WorkerGlobalScope object, 1010 shiftKey property, Event object, 451, 467, 485, setItem( ) method, Storage object, 988 917 setMilliseconds( ) method, Date object, 754 shortcut properties in CSS, 416 setMinutes( ) method, Date object, 755 corresponding properties in setMonth( ) method, Date object, 755 CSSStyleDeclaration object, 432 setRequestHeader( ), XMLHttpRequest, 496 show( ) method, jQuery, 553 setRequestHeader( ), XMLHttpRequest object, showModalDialog( ), Window object, 349, 1016 1007 sets, Set class (example), 215–217 sibling properties, Element object, 372 setSeconds( ) method, Date object, 756 side effects setSelectionRange( ), Input object, 945 case expressions containing, 96 setSelectionRange( ), TextArea object, 995 expressions with, 87 setTime( ) method, Date object, 756 operator, 64 setTimeout( ) function, 297, 322 Sieve of Eratosthenes algorithm, 688 implementing timeouts for sin( ) function, Math object, 799 XMLHttpRequest, 510 size of elements, setting with CSS properties, setTimeout( ) method 421 Window object, 308, 342, 1007 size property WorkerGlobalScope object, 1010 Blob object, 863 setTransform( ), CanvasRenderingContext2D, Input object, 944 638, 641, 879 Select element, 986 setUTCDate( ) method, Date object, 757 Sizzle library, 370 setUTCFullYear( ) method, Date object, 757 slice( ) method setUTCHours( ) method, Date object, 758 Array object, 150, 735 setUTCMilliseconds( ) method, Date object, Blob object, 691, 695, 863 758 jQuery, 579 setUTCMinutes( ) method, Date object, 759 String object, 846 setUTCMonth( ) method, Date object, 759 slideDown( ), slideUp( ), and slideToggle( ) setUTCSeconds( ) method, Date object, 760 methods, jQuery, 553 Index | 1067
some( ) method, Array object, 154, 736 conditional, 92 sort( ) method, Array object, 149, 737 else if, 94 functions as arguments, 177 if, 92 sorting objects for comparison, 222 switch, 95 <source> elements, 615 control structure, in function body, 7 source property debugger, 110 MessageEvent object, 677, 972 declaration, 89 RegExp object, 833 defined, 6 sparklines, 377 expression statements, 88 drawing in canvas (example), 663–665 function declaration, 91, 164 sparse arrays, 141, 144 jumps, 102 speed property, Geocoordinates object, 933 break statements, 103 spell-checking in browsers, 409 continue statements, 104 Spidermonkey labeled statements, 102 destructuring assignment, 272 return statements, 105 JavaScript versions, 269 throw statements, 106 support for E4X, 283 try/catch/finally statements, 106 support for JavaScript extensions, 265 loops, 97 splice( ) method, Array object, 151, 737 do/while loops, 98 split( ) method for loops, 98 splitting cookie property into name/value for/in loops, 100 pairs, 596 while loops, 97 String object, 261, 847 summary of, 112 splitText( ) method, Text node, 994 terminating, optional semicolons and, 25 SQL databases, 705 with statement, 108 sqrt( ) function, Math object, 799 static positioning of elements, 420 SQRT1_2 constant (Math), 799 status codes, Ajax in jQuery, 560 SQRT2 constant (Math), 800 status property src attribute, <script> element, 313 ApplicationCache object, 606 src property XMLHttpRequest object, 1014 IFrame object, 940 statusText, XMLHttpRequest object, 1015 Image object, 941 step property, Input object, 944 MediaElement object, 968 stepDown( ) method, Input object, 945 Script object, 985 stepMismatch property, FormValidity object, srcdoc property, IFrame object, 940 932 srcElement property, Event object, 917 stepUp( ) method, Input object, 945 standards mode, 330 stop( ) method, jQuery, 557 HTML document display, 369 stopImmediatePropagation( ), Event object, start( ) method 465, 919 MessagePort object, 972 StopIteration exceptions, 275 TimeRanges object, 996 thrown by generators' next( ) method, 278 startOffsetTime, MediaElement object, 968 stopPropagation( ), Event object, 464, 919 state property storage, 587 History object, 673 (see also client-side storage) PopStateEvent object, 673, 982 Storage object, 987 state-change events, 449 storageArea property, StorageEvent object, statement blocks, 88 988 statements, 87–113 StorageEvent object, 988 compound and empty, 88 streaming API for innerHTML property, 407 1068 | Index
streaming media, initialTime property, 619 static method, fromCharCode( ), 836 streams, in Node, 298 substr( ) method (deprecated), 849 strict equality operator (===), 71 substring( ) method, 849 strict inequality operator (!==), 71 toLocaleLowerCase( ) method, 850 strict mode, 111 toLocaleUpperCase( ) method, 851 reserved words, 24 toLowerCase( ) method, 74, 851 strictness toSting( ) method, 851 event handlers defined in non-strict mode, toUpperCase( ) method, 74, 852 458 trim( ) method, 852 string concatenation operator (+), 67, 74 valueOf( ) method, 852 string literals, 36 Unicode characters, codepoints, and, 36 escape sequences in, 37 values in stylesheet or style attribute, 432 String( ) constructor, 43 working with, 38 String( ) function, type conversions with, 47 wrapper objects, 43 stringify( ) function, 138, 788 stroke strings, 29, 36 colors, gradients, and patterns in Canvas, as arrays, 160 645–648, 868 comparisons, 44, 74 defined, 879 conversions, 45, 47 pattern and gradient stroke, 647 between JavaScript and Java, 293 unclipped, 652 object to string, 50 stroke( ), CanvasRenderingContext2D, 633, converting arrays to, 152 648, 879 encoding application state as, 672 strokeRect( ), CanvasRenderingContext2D, immutability of, 31 645, 879 methods for pattern matching, 259–261 strokeStyle property, match( ) method, 260 CanvasRenderingContext2D, 635, replace ( ) method, 260 872 search ( ) method, 259 strokeText( ), CanvasRenderingContext2D, object conversion to, for Ajax, 559 650, 879 parsing HTTP response, 500 strongly typed languages pattern matching, 39 classes in, 199 properties accessed with [ ] notation, 121 objects in, 120 String object, 835–852 structure and traversal (Document objects), charAt( ) method, 838 371–375 charCodeAt( ) method, 838 documents as trees of elements, 372–375 concat( ) method, 839 documents as trees of nodes, 371 fromCharCode( ) method, 481, 839 structured clones, 672 HTML methods, 836 <style> elements indexOf( ) method, 840 Element objects representing, 440 lastIndexOf( ) method, 841 enclosing CSS stylesheet in, 415 length property, 842 style attribute, 10 localeCompare ( ) method, 74 Style object, 989 localeCompare( ) method, 842 style properties, 414 match( ) method, 843 combining using shortcut properties, 416 methods, listed, 835 important, 419 replace( ) method, 844 units for settings, 432 search( ) method, 845 style property, 308 slice( ) method, 846 CSSRule object, 886 split( ) method, 847 Element object, 308, 431, 906 Index | 1069
style rules, 414 synchronous execution of scripts, 319 styles, cascade of, 415 synchronous HTTP responses, 499 stylesheets, 440–443 SyntaxError object, 852 associating with HTML documents, 415 raised in strict mode when deleting creating new, 442 properties, 125 CSSStyleSheet object, 887 systemId property, DocumentType object, defined, 414 899 enabling and disabling, 440 querying, inserting, and deleting rules, 441 T styleSheets property, Document object, 440, 441, 894 Table object, 990 sub-statements, 89 table of contents, generating for a document subarray( ), TypedArray object, 689, 998 (example), 387–390 subclasses, 228 TableCell object, 991 class hierarchies and abstract classes, 234– TableRow object, 991 238 TableSection object, 992 composition versus subclassing, 233 tabs in browser windows, 353 constructor and method chaining, 231–233 tag names (XML), 285 creating using ECMAScript 5 features, 243 tag names, getting elements by, 366 defining, 229 tagName property subdomains, problems posed by same-origin Element object, 906 policy, 335 tan( ) function, Math object, 800 submit( ) method target property Form object, 400, 929 Event object, 918 jQuery, 541 in jQuery, 543 triggering events, 547 events, 446 subpaths (Canvas), 632 Form object, 399, 929 subsets of JavaScript, 265–269 ProcessingInstruction object, 982 The Good Parts, 266 tBodies property, Table object, 990 for security, 267 temporary filesystem, 700 listing of important subsets, 268 terminate( ) method, Worker object, 682, substr( ) method (deprecated), String object, 1009 849 test expression (for loops), 98 substring( ) method, String object, 849 test( ) method, RegExp object, 263, 834 substringData( ) method text, 36–40 Comment node, 881 CharacterData methods for manipulating, Text node, 994 382 support property, 574 conversion to speech in screen readers, 332 SVG (Scalable Vector Graphics), 622–630 drawing in canvas, 650, 869, 876 <canvas> element versus, 630 element content as plain text, 380 displaying time by manipulating image, embedding arbitrary textual data using 628 script element, 314 pie chart built with JavaScript, 624–627 escape sequences in string literals, 37 <svg:path> elements, 627 pattern matching with regular expressions, swapCache( ), ApplicationCache object, 607, 39 860 querying selected text in documents, 407 switch statements, 95 reading text files with FileReader, 698 case clauses, 96 in <script> elements, 381 synchronous event triggering in jQuery, 547 string literals, 36 text fields in forms, 402 1070 | Index
working with strings, 38 in client-side JavaScript, 322 Text and Textarea elements, forms, 400 FileReaders and, 698 text input events, 481–484 IndexedDB operations and, 707 filtering user input (example), 482–484 Web Workers specification, 680–687 support for, DOM Events specification, debugging Worker threads, 686 453 Worker execution model, 683 using propertychange event to detect, 484 Worker threads, 1008 Text nodes, 371, 993 WorkerGlobalScope object, 1009 creating, 382 3D graphics for <canvas> element, 631, 688 element content as, 381 throw statements, 106 text property throw( ) method, generators, 280 HTMLElement object, 314 time, 752 Link object, 963 (see also dates and time) Option object, 404, 981 Date.getTime( ) function, 766 Script object, 985 UTC and GMT, 742 text( ) method, jQuery, 534 time( ) method, Console object, 883 text-input form elements timeEnd( ) method, Console object, 883 browsers triggering input event on, 450 timeline, client-side JavaScript program text-shadow property, 422 execution, 323 textAlign property, timeout option, Geolocation methods, 934 CanvasRenderingContext2D, 651, timeout property, XMLHttpRequest object, 872 510, 1015 <textarea> elements, 403 TimeRanges object, 619, 995 TextArea object, 994 timers, 342–343 textBaseline property, client-side timer functions implemented by CanvasRenderingContext2D, 651, Node, 297 873 methods available to WorkerGlobalScope textContent property, Node object, 380, 977 object, 683 textLength property similarity to events, 449 TextArea object, 995 using in inline scripting of CSS animation, TextMetrics object, 651, 877, 995 433–435 TextRange object (IE), 408 utility function for (example), 342 tFoot property, Table object, 990 timeStamp property, Event object, 543, 918 tHead property, Table object, 990 timestamp property, Geoposition object, 935 third dimension, z-index property, 422 title property this keyword CSSStyleSheet object, 440, 887 in event handlers, 401 Document object, 405, 894 function invocation context, 163 Element object, 906 functions used as methods, 168 Link object, 963 in method invocation, 168 Style object, 989 nested function invoked as method or toArray( ) method, jQuery, 529 function, 169 toDataURL( ), Canvas object, 656, 865 as primary expression, 58 toDateString( ) method, Date object, 760 referring to global object, 42, 783 toElement property, Event object, 918 referring to target of event handlers, 461 toExponential( ), Number object, 48, 804 removal or restriction in secure subsets, toFixed( ), Number object, 48, 805 267 toggle buttons, 402 use in property getters and setters, 130 toggle( ) method threading DOMTokenList object, 902 Index | 1071
jQuery, 541, 553 type conversions with, 49 toggleClass( ) method, jQuery, 532 total property, ProgressEvent, 508, 984 toGMTString( ) method, Date object, 761 toTimeString( ), Date object, 764 toISOString( ) method, Date object, 761 touchscreens, events, 456 toJSON( ) method, 139 toUpperCase( ) method, String object, 852 Date object, 138, 762 toUTCString( ) method, Date object, 764 implementation in classes, 220 trace( ) method, Console object, 883 token lists, DOM, 901 transaction management in IndexedDB, 707 toLocaleDateString( ), Date object, 762 transform( ) method, toLocaleLowerCase( ), String object, 850 CanvasRenderingContext2D objects, toLocaleString( ) method, 139 641, 880 Array object, 152, 738 transformations Date object, 763 canvas coordinate system, 638–643, 869 implementation in classes, 220 transformation example, 641 Number object, 806 understanding mathematically, 640 Object class, 823 coordinate system in canvas toLocaleTimeString( ), Date object, 763 shadows and, 655 toLocaleUpperCase( ), String object, 851 setTransform( ) method in canvas, 879 toLowerCase( ) method, String object, 851 Transforms (CSS), 419 tooLong property, FormValidity object, 932 Transitions module (CSS), 419, 435 top and left style properties, 421, 425 translate( ) method, top property CanvasRenderingContext2D, 638, ClientRect object, 880 880 Window object, 356, 1004 translucency, specifying with opacity style top, bottom, right, and left properties, 392 property, 428 top, left, width, and height style properties, translucent windows, overlapping with CSS 424 (example), 429–431 top-level ancestor window, 354 transparency top-level windows compositing operations with hard and soft null frameElement property, 357 transparency, 657 parent property referring to self, 356 specifying alpha values in canvas, 646 toPrecision( ), Number object, 48, 807 specifying for colors in CSS, 427 toStaticHTML( ) method (IE), 337 transports, 492 toString( ) method, 139 traversal of documents element-by-element, Array object, 152, 739 portable functions for, 373 Boolean object, 741 tree structure converting boolean values to strings, 41 documents as trees of elements, 372–375 Date object, 763 documents as trees of nodes, 371 Error object, 770, 771 geometrical, coordinate-based view of Function object, 780 document versus, 390 functions, 189 representation of HTML documents, 362 implementation in classes, 220 trigger( ) function, 549 Location object, 343 trigger( ) method, jQuery, 542, 547 Number object, 48, 807 triggerHandler( ) method, jQuery, 548 Object class, 824 triggering events, 547 querying class attribute, 136 preventing jQuery from triggering Ajax- RegExp object, 834 related events, 571 Selection object, 408 trim( ) function, 574 String object, 851 trim( ) method, String object, 852 1072 | Index
true and false values, 45 undefined values, 29, 41, 854 try/catch/finally statements, 106 properties set to, testing, 125 multiple catch clauses in, 283 properties with, access errors, 123 Tufte, Edward, 663 property access expressions and, 60 Twitter search gadget, controlled by returned by functions, 166 postMessage( ), 678–680 variables declared without initializer, 90 type (tag name), selecting HTML or XML undelegate( ) method, jQuery, 549 elements by, 366 deregistering event handlers for live events, type attribute, <script elements>, 314 550 type property underflow, 33 Blob object, 863 unescape( ) function (deprecated), 855 CSSRule object, 886 Unicode, 21 CSSStyleSheet object, 887 characters, codepoints, and JavaScript Event object, 918 strings, 36 events, 446 codepoints, 481 form elements, 397, 400 escape sequences for, 22 FormControl object, 930 format control characters, 22 Script object, 985 in identifiers, 24 Select element, 403 normalization of character encodings, 23 Style object, 989 unit specification for CSS style properties, 429, TypedArray object, 996 432 TypeError object, 42, 853 unlabeled continue statements, 104 property access errors, 123 unload events, 450 raised by attempts to create or modify BeforeUnloadEvent object, 863 properties, 133 unmonitorEvents( ), ConsoleCommandLine resulting from attempts to delete properties, object, 885 124 unobtrusive JavaScript, 311 thrown in type conversions, 47 unshift( ) method, Array object, 146, 152, 739 typeMismatch property, FormValidity object, untyped variables, 31 932 unwrap( ) method, jQuery, 540 typeof operator, 62, 82, 210 update( ) method, ApplicationCache object, applied to null and undefined values, 41 607, 860 using with XML objects, 284 upload progress events, 508 types (see data types) upload property, XMLHttpRequest object, types property, DataTransfer object, 477, 889 508, 1015 URIError object, 855 U URIs UI (user interface) decodeURI( ) function, 766 decodeURIComponent( ) function, 767 events, 448 encodeURI( ) function, 767 Java, implementing using JavaScript in encodeURIComponent( ) function, 768 Rhino, 292 URL objects, 998 GUI example, 293–296 URL property jQuery UI library, 585 Document object, 343, 405, 894 Uint16Array class, 996 Window object, 1004 Uint32Array class, 996 url property Uint8Array class, 996 EventSource object, 921 Uint8Array objects, 688 StorageEvent object, 989 unary arithmetic operators, 68 WebSocket object, 1000 unbind( ) method, jQuery, 546 Index | 1073
URLs Progress object, 983 blank-page URL, about:blank, 354 valueAsDate property, Input object, 944 Blob, 695–697 valueAsNumber property, Input object, 944 displayed as current state of web valueMissing property, FormValidity object, application, 672 932 importScripts( ) function arguments, 682 valueOf( ) method, 140 JavaScript, 315 Boolean object, 741 loading document and displaying portions Date object, 766 of it with jQuery, 559 implementation in classes, 220 parsing, 343 Number object, 808 relative, 344 Object class, 825 subject of HTTP request, 496 object comparisons, 223 URL object, 998 String object, 852 WebSocket, 713 type conversions with, 50 wildcard, in network section of application values, 4 cache manifest, 603 functions as, 176–178 use strict directive, 110 defining your own function properties, user input 178 filtering, 482–484 values( ) method, ConsoleCommandLine, 885 text events, 481 var keyword, 52 user interface (see UI) replacing with let, 270 user-defined objects, 116 var statements, 90 userAgent property varargs functions, 173 Navigator object, 347, 974 variable-length argument lists, 172 WorkerNavigator object, 1012 variables, 4 userData API (IE), 588 in array comprehensions, 281 userData property creating with function keyword, 358 persistence, 599–601 data types and, 31 UTC (Coordinated Universal Time), 742 declaring, 52 UTC( ) method, Date object, 765 repeated and omitted declarations, 52 declaring with let, 270 V destructuring assignment, 272 val( ) method, jQuery, 533 functions assigned to, 176 global, 25 valid property, FormValidity object, 932 scope, 53–56 validation of forms function scope and hoisting, 54 FormValidity objects, 932 scope chain, 55 mechanism in HTML5, 455 variables as properties, 55 validationMessage, FormControl object, 930 variable reference as primary expression, validity property, FormControl object, 930 58 by value versions, 269 comparisons of primitives, 44 <video> elements, 615 value attribute (properties), 131 controls attribute, 616 value attribute, cookies, 595, 596 events, 454 value property Video object, 998 DOMSettableTokenList object, 901 videoHeight and videoWidth properties, Video form elements, 400 object, 999 FormControl object, 931 view property, Event object, 918 Meter object, 973 viewport Option object, 981 1074 | Index
defined, 390 compositing operations in, 659 determining size of, 391 console tools, 3 viewport coordinates, 390 CORS (“Cross-Origin Resource Sharing”) element positions in, 392 headers support, 511 visibility CSS box model, 425 partial visibility with overflow and clip style CSS box-sizing property, 426 properties, 428 CSS color specifications support, 427 visibility property, 419, 426 CSS selector support, 370 visual effects CSS support, 416 image rollovers, 614 current versions, 327 jQuery methods for, 551, 956 database support, 705 jQuery methods for simple effects, 552 dataset property, not implemented, 378 motion blur of canvas graphics with DOMContentLoaded event, 465 ImageData, 661 editing document content, 409 visual effects libraries, 435 element-by-element document traversal void operator, 62, 85 support, 373 forcing invocation or assignment event handlers directed at browser as a expressions to be undefined, 316 whole, 458 volume event listener registration methods, 321 setting for media playback, 618 EventSource support, 517 volume property, MediaElement, 968 HTML5 form features and events, 455 HTTP progress events implementation, W 507 W3C implementation of CSS Transitions, 435 information about browsers and their XMLHttpRequest Level 2 standard (XHR2), screens, 346–348 494 input event type fired after text insertion into WAI-ARIA (Web Accessibility Initiative– element, 484 Accessible Rich Internet insertAdjacentHTML( ) method support, Applications), 332 380 warn( ) method, Console object, 883 JavaScript in, 307–339 wasClean property, CloseEvent, 881 accessibility, 332 watchPosition( ) method, Geolocation object, client-side frameworks, 338 934 compatibility and interoperability, 325– watchPosition( ), Geolocation object, 669 332 Web Accessibility Initiative–Accessible Rich embedding JavaScript in HTML, 311– Internet Applications (WAI-ARIA), 317 332 execution of JavaScript programs, 317– web applications, 12 324 JavaScript in, 310 security, 333–338 loan calculator (example), 12–18 URLs, 315 offline, 608–612 web applications, 310 web browsers web documents, 310 asynchronous script execution, 324 JavaScript tools, 3 <canvas> element support, 630 javascript: URLs, 316 children property of Element objects, jQuery.browser property, 571 support of, 372 keyIdentifier property in Chrome and Safari, client-side databases integrated into, 588 485 compatibility and interoperability issues, location and navigation, 343–345 325 Index | 1075
mousewheel event support, 471 debugging workers, 686 Navigator object, 346 making synchronous XMLHttpRequests in opacity specifications, 428 (example), 686 prefixes for nonstandard CSS properties, using synchronous filesystem API with 416 worker threads, 704 RegExp literals and object creation, 252 worker for image processing (example), Safari on iPhone and iPad, 456 684 scope of localStorage, 590 Worker objects, 681 scripting a modal dialog (example), 9 Worker scope, 682 string indexing, 39 WebGL, 631 support for E4X, 274 webkitURL.revokeObjectURL( ) method, 697 support for object literal get and set syntax, WebSocket object, 999 134 wheel events (see mousewheel events) support of getElementsByClassName( ), wheelDelta properties, 471 369 wheelDelta property, Event object, 918 SVG support, 622 wheelDeltaX and wheelDeltaY properties, timeouts for HTTP requests, XHR2, 510 Event object, 918 transformed into simple operating systems, which property, Event object, 451, 544, 918 310 while loops, 97 triggering input event on text-input form continue statements in, 104 elements, 450 whitespace use of callable objects, 191 in JavaScript code, 22 using JavaScript, 9 matching with regular expressions, 254 web applications stored on, 601 wholeText property, Text node, 993 websites for compatibility information, 326 width and height properties XMLHttpRequest readyState values, 498 Canvas context objects, 637 web bugs, 492 Canvas object, 865 web databases, 588 Image object, 941 web documents ImageData object, 942 JavaScript in, 310 querying for element in jQuery, 535 web fonts, 418 Screen object, 985 web pages, 12 Video object, 998 scripting content, presentation, and width and height style properties, 421, 425 behavior, 9 width property web sockets, 713–716 ClientRect object, 881 chat server using WebSockets and Node, IFrame object, 940 715 TextMetrics object, 995 creating socket and registering event width( ) method, jQuery, 535 handlers, 713 wildcard URL in application cache manifest, creating WebSocket-based chat client, 714 603 Web Storage API, 455, 587, 705 willValidate, FormControl object, 931 web workers window coordinates, 390 Worker object, 1008 Window object, 42, 1001–1008 WorkerGlobalScope object, 1009 alert( ), confirm( ), and prompt( ) methods, WorkerLocation object, 1011 348 WorkerNavigation object, 1012 applicationCache property, 604 Web Workers specification, 680–687 beforeprint and afterprint events, 455 access to Blob URLs, 695 close( ) method, 356 advanced worker features, 684 closed property, 356 1076 | Index
constructors, 1004 window property, Window object, 308, 1004 dialogArguments property, 349 WindowProxy object, 359 document property, 308, 361 windows, 341–360 entry point to client-side JavaScript, 307 browser and screen information, 346–348 event handlers, 1007 browser location and navigation, 343–345 event handlers directed at browser as a loading new documents, 344 whole, 458 parsing URLs, 343 event property, 460 browser, JavaScript opening and closing, features available to WorkerGlobalScope 333 objects, 683 browser, same-origin policy and, 334 frameElement property, 357 browsing history, 345 frames property, 357 dialog boxes, 348–351 getComputedStyle( ) method, 436 document elements as properties of, 351 getSelection( ) method, 408 error handling, 351 length property, 357 events, 450 load event, 465 multiple windows and frames, 353–360 localStorage and sessionStorage properties, JavaSclript in interacting windows, 358 589 opening and closing windows, 354–356 location property, 343 relationship between frames, 356 methods, 1004 overlapping translucent windows (CSS name property, 354 example), 429–431 navigator property, 346 querying scrollbar positions, 390 offline and online events, 455 querying viewport size, 391 onbeforeunload event handler, 462 timers, 342–343 onerror property, 351, 450 with statements, 108 setting to a function, 321 removal in secure subsets, 267 onhashchange property, 672 withCredentials, XMLHttpRequest, 511, 1015 onload event handler, 309 Worker object, 681, 1008 open( ) method, 354 Worker( ) constructor, 684 javascript: URL as argument, 315 WorkerGlobalScope object, 682, 1009 opener property, 356 properties, 683 orientation property, 456 WorkerLocation object, 1011 pageXOffset and pageYOffset properties, WorkerNavigator object, 1012 391 wrap( ), wrapAll( ), and wrapInner( ) methods, parent property, 356 jQuery, 539 postMessage( ) method, 336, 677 wrapper objects, 43 Twitter search gadget controlled by, writable attribute (properties), 116, 131 678–680 extensible attribute used with, 137 properties, 1001 write( ) method, Document object, 318, 324, screen property, 348, 984 406, 898 scroll( ) method, 394 writeFile( ) function, 299 scrollTo( ) and scroll( ) methods, 394 writeFileSync( ) function, 299 setInterval( ) method, 342 writeln( ) method, Document object, 407, 898 setTimeout( ) method, 342 ws:// or wss:// protocol, 713 setting onload property to event handler function, 457 X storage event, 455 top property, 356 XHR2, 494 URL property, 998 downloading URL contents as Blob, 694 FormData API, 506 Index | 1077
handling binary responses, 501 responseText property, 500 overrideMimeType( ) method, 501 retrieving the response, 498–502 progress events, 1017 simulation by jqXHR object in jQuery 1.5, timeout property, 510 565 XHTML specifying the request, 495 case sensitivity, 21 use by Ajax utility functions in jQuery, 561 <script> elements, 312 Version 2 of specification, 455 SVG embedded in document, 623 XMLHttpRequest( ) constructor, 684 XML XMLHttpRequestUpload object, 1018 E4X (ECMAScript for XML) XMLList objects, 284 introduction to, 283–287 XSS (cross-site scripting), 336 ECMAScript for XML (E4X), 274 HTTP request encoded with XML Y document as body, 504 innerHTML property, use with XML yield expressions, 280 elements, 379 yield keyword, 277 namespaces, createElementNS( ) method, yieldForStorageUpdates( ), Navigator object, 382 975 optional in scripted HTTP, 493 YUI (in-house library of Yahoo!), 339 outerHTML property, use of, 379 parsing HTTP response document with Z responseXML property, 500 z-index property, 422 processing instruction in a document, 982 zero-based indexing (strings and arrays), 36, querying and setting elements of 141 documents, 376 SVG (Scalable Vector Graphics), 622 Text nodes in documents, 381 XML objects, 284 XMLHttpRequest API, 493 core portions and Level 2 draft (XHR2), 494 XMLHttpRequest object, 311, 1012 aborting requests and setting timeouts, 510 constants defining values of readyState property, 1013 cross-origin HTTP requests, 511–513 emulating EventSource with, 517–519 encoding request body, 502–507 event handlers, 1017 HTTP progress events, 507–510 HTTP requests and responses, 495 instantiating, 494 local files and, 495 making synchronous requests in Web Worker, 686 methods, 1015 POSTing plain text to a server, 497 posting user’s chat messages to server, 516 properties, 1014 1078 | Index
About the Author David Flanagan is a programmer and writer with a website at http://davidflanagan .com. His other O’Reilly books include JavaScript Pocket Reference, The Ruby Pro- gramming Language, and Java in a Nutshell. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and children in the Pacific Northwest between the cities of Seattle, Washington, and Vancouver, British Columbia. Colophon The animal on the cover of JavaScript: The Definitive Guide, sixth edition, is a Javan rhinoceros. All five species of rhinoceros are distinguished by their large size, thick armor-like skin, three-toed feet, and single or double snout horn. The Javan rhinoceros, along with the Sumatran rhinoceros, is one of two forest-dwelling species. The Javan rhinoceros is similar in appearance to the Indian rhinoceros, but smaller and with cer- tain distinguishing characteristics (primarily skin texture). Rhinoceroses are often depicted standing up to their snouts in water or mud. In fact, they can frequently be found just like that. When not resting in a river, rhinos will dig deep pits in which to wallow. Both of these resting places provide a couple of advan- tages. First, they give the animal relief from the tropical heat and protection from blood- sucking flies. (The mud that the wallow leaves on the skin of the rhinoceros also pro- vides some protection from flies.) Second, mud wallows and river water help support the considerable weight of these huge animals, thereby relieving the strain on their legs and backs. Folklore has long held that the horn of the rhinoceros possesses magical and aphro- disiac powers, and that humans who gain possession of the horns will also gain those powers. This is one of the reasons why rhinos are a prime target of poachers. All species of rhinoceros are in danger, and the Javan rhino population is the most precarious. Fewer than 100 of these animals are still living. At one time, Javan rhinos could be found throughout southeastern Asia, but they are now believed to exist only in Indo- nesia and Vietnam. The cover image is a 19th-century engraving from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont’s TheSans Mono Condensed.
Search
Read the Text Version
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
- 142
- 143
- 144
- 145
- 146
- 147
- 148
- 149
- 150
- 151
- 152
- 153
- 154
- 155
- 156
- 157
- 158
- 159
- 160
- 161
- 162
- 163
- 164
- 165
- 166
- 167
- 168
- 169
- 170
- 171
- 172
- 173
- 174
- 175
- 176
- 177
- 178
- 179
- 180
- 181
- 182
- 183
- 184
- 185
- 186
- 187
- 188
- 189
- 190
- 191
- 192
- 193
- 194
- 195
- 196
- 197
- 198
- 199
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 209
- 210
- 211
- 212
- 213
- 214
- 215
- 216
- 217
- 218
- 219
- 220
- 221
- 222
- 223
- 224
- 225
- 226
- 227
- 228
- 229
- 230
- 231
- 232
- 233
- 234
- 235
- 236
- 237
- 238
- 239
- 240
- 241
- 242
- 243
- 244
- 245
- 246
- 247
- 248
- 249
- 250
- 251
- 252
- 253
- 254
- 255
- 256
- 257
- 258
- 259
- 260
- 261
- 262
- 263
- 264
- 265
- 266
- 267
- 268
- 269
- 270
- 271
- 272
- 273
- 274
- 275
- 276
- 277
- 278
- 279
- 280
- 281
- 282
- 283
- 284
- 285
- 286
- 287
- 288
- 289
- 290
- 291
- 292
- 293
- 294
- 295
- 296
- 297
- 298
- 299
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
- 309
- 310
- 311
- 312
- 313
- 314
- 315
- 316
- 317
- 318
- 319
- 320
- 321
- 322
- 323
- 324
- 325
- 326
- 327
- 328
- 329
- 330
- 331
- 332
- 333
- 334
- 335
- 336
- 337
- 338
- 339
- 340
- 341
- 342
- 343
- 344
- 345
- 346
- 347
- 348
- 349
- 350
- 351
- 352
- 353
- 354
- 355
- 356
- 357
- 358
- 359
- 360
- 361
- 362
- 363
- 364
- 365
- 366
- 367
- 368
- 369
- 370
- 371
- 372
- 373
- 374
- 375
- 376
- 377
- 378
- 379
- 380
- 381
- 382
- 383
- 384
- 385
- 386
- 387
- 388
- 389
- 390
- 391
- 392
- 393
- 394
- 395
- 396
- 397
- 398
- 399
- 400
- 401
- 402
- 403
- 404
- 405
- 406
- 407
- 408
- 409
- 410
- 411
- 412
- 413
- 414
- 415
- 416
- 417
- 418
- 419
- 420
- 421
- 422
- 423
- 424
- 425
- 426
- 427
- 428
- 429
- 430
- 431
- 432
- 433
- 434
- 435
- 436
- 437
- 438
- 439
- 440
- 441
- 442
- 443
- 444
- 445
- 446
- 447
- 448
- 449
- 450
- 451
- 452
- 453
- 454
- 455
- 456
- 457
- 458
- 459
- 460
- 461
- 462
- 463
- 464
- 465
- 466
- 467
- 468
- 469
- 470
- 471
- 472
- 473
- 474
- 475
- 476
- 477
- 478
- 479
- 480
- 481
- 482
- 483
- 484
- 485
- 486
- 487
- 488
- 489
- 490
- 491
- 492
- 493
- 494
- 495
- 496
- 497
- 498
- 499
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 509
- 510
- 511
- 512
- 513
- 514
- 515
- 516
- 517
- 518
- 519
- 520
- 521
- 522
- 523
- 524
- 525
- 526
- 527
- 528
- 529
- 530
- 531
- 532
- 533
- 534
- 535
- 536
- 537
- 538
- 539
- 540
- 541
- 542
- 543
- 544
- 545
- 546
- 547
- 548
- 549
- 550
- 551
- 552
- 553
- 554
- 555
- 556
- 557
- 558
- 559
- 560
- 561
- 562
- 563
- 564
- 565
- 566
- 567
- 568
- 569
- 570
- 571
- 572
- 573
- 574
- 575
- 576
- 577
- 578
- 579
- 580
- 581
- 582
- 583
- 584
- 585
- 586
- 587
- 588
- 589
- 590
- 591
- 592
- 593
- 594
- 595
- 596
- 597
- 598
- 599
- 600
- 601
- 602
- 603
- 604
- 605
- 606
- 607
- 608
- 609
- 610
- 611
- 612
- 613
- 614
- 615
- 616
- 617
- 618
- 619
- 620
- 621
- 622
- 623
- 624
- 625
- 626
- 627
- 628
- 629
- 630
- 631
- 632
- 633
- 634
- 635
- 636
- 637
- 638
- 639
- 640
- 641
- 642
- 643
- 644
- 645
- 646
- 647
- 648
- 649
- 650
- 651
- 652
- 653
- 654
- 655
- 656
- 657
- 658
- 659
- 660
- 661
- 662
- 663
- 664
- 665
- 666
- 667
- 668
- 669
- 670
- 671
- 672
- 673
- 674
- 675
- 676
- 677
- 678
- 679
- 680
- 681
- 682
- 683
- 684
- 685
- 686
- 687
- 688
- 689
- 690
- 691
- 692
- 693
- 694
- 695
- 696
- 697
- 698
- 699
- 700
- 701
- 702
- 703
- 704
- 705
- 706
- 707
- 708
- 709
- 710
- 711
- 712
- 713
- 714
- 715
- 716
- 717
- 718
- 719
- 720
- 721
- 722
- 723
- 724
- 725
- 726
- 727
- 728
- 729
- 730
- 731
- 732
- 733
- 734
- 735
- 736
- 737
- 738
- 739
- 740
- 741
- 742
- 743
- 744
- 745
- 746
- 747
- 748
- 749
- 750
- 751
- 752
- 753
- 754
- 755
- 756
- 757
- 758
- 759
- 760
- 761
- 762
- 763
- 764
- 765
- 766
- 767
- 768
- 769
- 770
- 771
- 772
- 773
- 774
- 775
- 776
- 777
- 778
- 779
- 780
- 781
- 782
- 783
- 784
- 785
- 786
- 787
- 788
- 789
- 790
- 791
- 792
- 793
- 794
- 795
- 796
- 797
- 798
- 799
- 800
- 801
- 802
- 803
- 804
- 805
- 806
- 807
- 808
- 809
- 810
- 811
- 812
- 813
- 814
- 815
- 816
- 817
- 818
- 819
- 820
- 821
- 822
- 823
- 824
- 825
- 826
- 827
- 828
- 829
- 830
- 831
- 832
- 833
- 834
- 835
- 836
- 837
- 838
- 839
- 840
- 841
- 842
- 843
- 844
- 845
- 846
- 847
- 848
- 849
- 850
- 851
- 852
- 853
- 854
- 855
- 856
- 857
- 858
- 859
- 860
- 861
- 862
- 863
- 864
- 865
- 866
- 867
- 868
- 869
- 870
- 871
- 872
- 873
- 874
- 875
- 876
- 877
- 878
- 879
- 880
- 881
- 882
- 883
- 884
- 885
- 886
- 887
- 888
- 889
- 890
- 891
- 892
- 893
- 894
- 895
- 896
- 897
- 898
- 899
- 900
- 901
- 902
- 903
- 904
- 905
- 906
- 907
- 908
- 909
- 910
- 911
- 912
- 913
- 914
- 915
- 916
- 917
- 918
- 919
- 920
- 921
- 922
- 923
- 924
- 925
- 926
- 927
- 928
- 929
- 930
- 931
- 932
- 933
- 934
- 935
- 936
- 937
- 938
- 939
- 940
- 941
- 942
- 943
- 944
- 945
- 946
- 947
- 948
- 949
- 950
- 951
- 952
- 953
- 954
- 955
- 956
- 957
- 958
- 959
- 960
- 961
- 962
- 963
- 964
- 965
- 966
- 967
- 968
- 969
- 970
- 971
- 972
- 973
- 974
- 975
- 976
- 977
- 978
- 979
- 980
- 981
- 982
- 983
- 984
- 985
- 986
- 987
- 988
- 989
- 990
- 991
- 992
- 993
- 994
- 995
- 996
- 997
- 998
- 999
- 1000
- 1001
- 1002
- 1003
- 1004
- 1005
- 1006
- 1007
- 1008
- 1009
- 1010
- 1011
- 1012
- 1013
- 1014
- 1015
- 1016
- 1017
- 1018
- 1019
- 1020
- 1021
- 1022
- 1023
- 1024
- 1025
- 1026
- 1027
- 1028
- 1029
- 1030
- 1031
- 1032
- 1033
- 1034
- 1035
- 1036
- 1037
- 1038
- 1039
- 1040
- 1041
- 1042
- 1043
- 1044
- 1045
- 1046
- 1047
- 1048
- 1049
- 1050
- 1051
- 1052
- 1053
- 1054
- 1055
- 1056
- 1057
- 1058
- 1059
- 1060
- 1061
- 1062
- 1063
- 1064
- 1065
- 1066
- 1067
- 1068
- 1069
- 1070
- 1071
- 1072
- 1073
- 1074
- 1075
- 1076
- 1077
- 1078
- 1079
- 1080
- 1081
- 1 - 50
- 51 - 100
- 101 - 150
- 151 - 200
- 201 - 250
- 251 - 300
- 301 - 350
- 351 - 400
- 401 - 450
- 451 - 500
- 501 - 550
- 551 - 600
- 601 - 650
- 651 - 700
- 701 - 750
- 751 - 800
- 801 - 850
- 851 - 900
- 901 - 950
- 951 - 1000
- 1001 - 1050
- 1051 - 1081
Pages: