Copyrighted Material

Copyrighted Material

Index Index –(pipe) as alternation symbol, 179 Symbols 32-bit PNG images in IE7, 459–460 - - (decrement) operator, 75, 80 & (AND) Bitwise logical operator, 72–73, 80 $ (dollar sign) in replacement symbols, 185 A % (modulus) operator, 74–75, 80 absolute positioning (CSS), 443–444, 447–451 ( ) (parentheses) in expressions, 85 accelerator plugins (browsers), 574 , (comma) accidental closures, 125 object literals and, 46 Acid Tests, 406 operator, 75 AC_Quicktime.js JavaScript library, 607 “ ” (quotation marks) Action Message Format (AMF), 523 in JSON, 557 ActionScript string literals and, 43–44 3.0, 596 ‘ ’ (single quotes) in string literals, 43–44 in Flash, 7 . (ellipses) for shortening strings, 195 ActiveX, security and, 484–485 /* and */ in comments, 48 ActiveXObject (global), 725 / / (forward slashes) addBehavior() method, 492 in comments, 48 Adobe Flash in regular expression literals, 46 cross-domain Ajax and, 523–524 ?: (conditional) operator, 75–76 Flash storage, 502–505 ? (match zero or one times symbol), 175 security and, 485 @ (at) symbol, 48 AIR (Adobe Integrated Runtime), 7 \ (backslash) Ajax, 511–531 in instances of regular expressions, “Ajax: A New Approach to Web Applications”, 173–174 511 in JSON, 558 browser compatibility and, 36 ^ (caret) symbol in string groups, 177 cross-domain Ajax. See cross-domain Ajax ^ (XOR) Bitwise logical operator, 73 history and bookmarking, 525–530 __ (underscores) for private properties/ JSON and, 567–569 methods, 262 XMLHttpRequest. See XMLHttpRequest (XHR) { } (curly braces) alarmArray, 247–248 blocks and, 47 COPYRIGHTEDalert() MATERIAL dialogue boxes, 289–290 object literals and, 46 alpha channel feature, 459 | (OR) Bitwise logical operator, 72 alphabetical string comparison, 163–164 + (concatenate operator), 159–160 alternation symbol (–), 179 ++ increment operator, 75, 80 AMF (Action Message Format), 523 + (plus) operator, 21 anchor/link objects, 951–952 !== and != equality operators, 65 .anchor(anchorName) method, 167 === and == equality operators, 65, 66 animation !== and != equality operators, 66 with canvases (browsers), 576–577 = (equals) operator, 66 DHTML, 451 bbindex.inddindex.indd 997575 66/25/09/25/09 88:23:05:23:05 PPMM anonymous functions anonymous functions defined, 229 as closures, 47 iterating and, 224 defined, 105 passing argument and, 114 Applets, Java, 591–594 associativity, operators and, 80–81 apply() method, 126–127, 131 asynchronous connections (XMLHttpRequest), Aptana, 16 515–516 Area object, 911–912 Asynchronous JavaScript and XML. See Ajax arguments attack surface (Ajax applications), 518 apply() method, 127 attributes argument hashes, 115–118 cookie attributes, 489–490 call() method, 127 CSS, 407–416 creating SQLite databases, 499 defined (DOM), 356 defining (functions), 104 Number.POSITIVE_INFINITY/Number.NEGATIVE_ for loops and, 87 INFINITY, 209 object, 114–115 XML/HTML documents, 540 optional, overloading and, 112–114 authentication passing by value vs. reference, 106 Authenticode, 480, 484 passing to functions (replace method), Cross-site request forgery and, 478 186–187 autosizing textareas, 395 arithmetic expressions, 61 arithmetic operators (JavaScript), 74, 654–660 Array object (global), 725–746 B arrays Back buttons, Ajax and, 525–526 for .. in loops and, 89 background-position attribute (DOM), 440 adding elements to. See elements, adding to backward compatibility, comparison operators arrays and, 66 arguments object and, 114 basic event model, 306–308 array literals, 45 behavior feature (IE 5), 492 Array object, basics, 217–218 big-endian order, bitwise operators and, 70–71 array of arrays, 220 bindings, event, 306–307, 326 Array.join() method, 233–234 bitwise operators (JavaScript), 62, 70–73, associative, 114, 229–231 669–674 creating, 218–219 block operator ({ }), 84 detecting, 220–222 blocks indexed, 219 basics, 47 iterating over, 223–224 script, 19 loops and, 643 blur() method, 385, 386 multi-dimensional, 220 body object, 920–922 objects as, 255–256 BOM (Browser Object Model), 9–10, 271 as reference types, 231–233 bookmarking, Ajax and, 525–530 removing elements from, 227–229 Booleans size of, 223 Boolean literals, 43 strings and, 196–197, 233–234 Boolean object, 199–203, 746 ASCII, 40 boolean values, 199 assignment operators (JavaScript) comparison operators and, 64 basics, 66–68 converting types to, 56 defined, 62 logical operators and, 68–69 reference, 660–669 working with, 200–201 associative arrays BoxObject, 449 basics, 229–231 break statements, 93–95 976 bbindex.inddindex.indd 997676 66/25/09/25/09 88:23:06:23:06 PPMM Charles Proxy Debugger Index breakpoints, setting (Firebug), 623 conditional compilation feature, 577–578 browsers CSS Transforms, 578–580 array iterator performance, testing, 223–224 Gears plugin (Google), 582–586 browser-based development (JavaScript), 4–5 Geolocation API, 580–582 comparing features of, 164 overview of unique, 573 concurrent requests and, 633 search providers, 586 detecting, 291–293 Vector Markup Language (VML), 587–588 detection class, building, 295–300 Web Workers threading module, 588–589 DOM storage events and, 496, 497 WorkerPool threading module (Gears), event compatibility comparison, 336–338 584–586 global object in, 130–131 bubbled statements, 96 gZip and, 635 bubbling, event, 319–320, 343 navigator object, 292 buttons numbers and, 204 Back and Forward (Ajax), 525 performance. See performance tuning basics, 386 replacement scheme symbols, 185 BUTTON/SUBMIT/RESET objects, 939 screen object, 294–295 custom submit, 381 security. See security radio, 387–389 serializing XML to text in, 539 status bar, 276 storage limits, 506 C string performance in, 160–161 caching support for E4X, 553 cache variable, 507–508 support of statements, 82–83 hashes for, 231 supporting ExternalInterface (Flash), 503 page weight reduction and, 634 supporting global object functions, 132–133 calls supporting XPath, 362 call() method, 127, 131 testing with, 18–19 call stacks, 96 W3C DOM storage and, 495 repeated math calls, 214–215 WYSIWYGs and, 396–397 canvas elements (browsers), 575–577 XMLHttpRequest and. See XMLHttpRequest Canvas object, 912–914 (XHR) capitalization, strings and, 168 XPath queries and, 544–545 caption object, 946 browsers, JavaScript in capture mode for IE mouse events, 322–323 cross-browser compatibility, 36 capture phase (event propagation), 320–322 deferred scripts, 30–31 carriage returns, string literals and, 44 DOM, 23–24 Cascading Style Sheets (CSS). See CSS dynamically loaded scripts, 33–34 (Cascading Style Sheets) event-driven scripts, 31–32 case sensitivity execution and load order, 27 JavaScript and, 41 external scripts, 30 strings and, 167–168 inline scripts, 28–29 catch() statement, 616 <noscript> element, 27 CDNs (Content Delivery Networks), 363, <script> element, 25–26 635–636 script masking, 27 Char classes, defined, 156 URLs, JavaScript in, 35 characters browser features encoding, 40–41 accelerator plugins, 574 extracting from strings, 192–193 animating with canvases, 576–577 charAt() method, 192–193 canvas elements, 575–577 Charles Proxy Debugger, 627 977 bbindex.inddindex.indd 997777 66/25/09/25/09 88:23:06:23:06 PPMM checkboxes checkboxes repeated for . in loops, 642–643 basics, 387 with statements, avoiding, 641 CHECKBOX/RADIO objects, 940 try . catch . finally constructs, 642 child frames, 274 tuning loops, 643 childNodes[ ] collection, 354 col/colgroup objects, 946 circular references, 123–125 collapsing ranges, 371 classes collections (DOM elements), 359–360 Char, 156 color of elements, modifying (DHTML), 457–458 class definitions in Java, 252 combinational (connubial) operators, 62, 73–75 fundamentals of, 253 comma (,) JavaScript programming and, 40 object literals and, 46 clearInterval() method, 246 operator, 75 client-side data and persistence commands, text editor (iFrame), 398–399 basics, 487 comments cookies, defined, 487 basics, 48 Flash storage, 488, 502–505 JavaScript (reference), 716–721 HTML5 client-side database, 488, 498–502 comparison methods of persisting data, 488 of objects, 256–257 persistence, defined, 487 operators, 62–66, 674–680 SQLite databases, 498–502 of strings, 163–164, 189–190 UserData in IE, 488, 492–494 XOR comparison of Boolean values, 202 W3C DOM storage, 488, 495–498 compatibility window.name storage, 488, 505–508 backwards (comparison operators), 66 cloning of events, 336–338 defined, 251 mode. See quirks mode objects, 251, 257 compiled languages, 5 closures composite data types vs. primitive data types, accidental, 125 51 basics, 47, 118–119 computed styles (CSS), 428–429 circular references, 123–125 += (concatenate assignment operators), 159, evaluated code, cleaning up, 119–120 160 function factories, 120 concatenate operator (+), 160 in JavaScript programming, 40 concatenation with loops, 121–123 concat() function, 226–227 private methods, simulating, 120–121 concat() method, 159–160, 232 privileged members and, 262–263 to reduce page weight, 634–635 problems with, 4 of strings, 159–161 timers and, 246–248 conditional compilation, 577–578, 716–721 code. See also source code, downloading conditional operator (?:), 75 cleaning up evaluated, 119–120 conditional statements, 84–87 eval() global function, 134–136 confirm() dialogue boxes, 289–290 JSON as evaluated code, 558 connections, opening (XMLHttpRequest), and performance, 632 514–517 profiling, 636–638 connubial operators, 73–75 writing using with statements, 100 console log, Firebug, 622 code optimization constants avoiding evaluated code, 639–640 mathematical, 211–212 deleting

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    24 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us