The document discusses techniques for mastering JavaScript known as JavaScript-Fu. It covers topics like event handling, DOM manipulation, performance optimization, and testing. It recommends using script-based event handling by default, and DOM or innerHTML methods depending on the specific task. The document also provides resources for learning more like the author's website and tools like Firebug and Selenium.
2. About Me
JavaScript hacker for
❖
6 years
Ruby/Rails for 2 years
❖
Author of Low Pro,
❖
DOM Builder, Sumo
and other stuff
Prototype Core Team
❖
http://danwebb.net
❖
9. THE ANCIENT MANUALS
OF JAVASCRIPT-FU
The Tao Of The Event Handler!
❖
5 Methods Of DOM Fist!
❖
Lightning Script Style!
❖
The 36 Chambers Of Shaolin!
❖
10. TRANSLATED...
Working with events
❖
Working with DOM elements
❖
Optimisation
❖
Testing and debugging
❖
28. WHICH WAY?
Use script-based event handling by
❖
default
If the page is large and this method
❖
results in unresponsiveness try event
delegation
If all else fails go for inline event
❖
handling
53. WHICH WAY?
No clear winner
❖
DOM is good for more surgical
❖
manipulation
innerHTML is good for replacing large
❖
amounts of content or simple jobs
79. SELENIUM
Written by ThoughtWorks
❖
Implemented in HTML/CSS
❖
Test cases define a series of user
❖
actions (using HTML)
Assertions check the correct results
❖