Category Archives: JavaScript

JavaScript Tips, Traps and Hacks

I am a China based develper currently involved in JavaScript. It’s a fantanstic exerience to discover so many nice things in such a scripting language with an initial design goal to be an add-on of an early web browser. Compared to other programming … Continue reading

Posted in JavaScript | Leave a comment

Possible mistakes in Pro JavaScript Techniques

I’m previewing the the ultimate JavaScript book for the modern web developer and have found several, maybe, mistakes. A side effect of the anonymous function scope induction trick At the end of Chapter 2 >> Privileged Methods Listing 2-25. Example … Continue reading

Posted in JavaScript | 4 Comments

Why is this?

(function(){}).__proto__ === (function(){}).__proto__ // => false ({}).__proto__ === ({}).__proto__ // => true

Posted in JavaScript | Leave a comment

Leak Free Event Observation Patch for Prototype

2006-10-24 +8 Update: According to IE 7 vs IE 6, IE 7 seems to have solved the memory leaks. So this patch is not needed for IE7. 2006-09-05 15:33:39 GMT+0800 UPDATE: I found that this patch breaks Event.stopObserving, I’ll update it … Continue reading

Posted in JavaScript | 25 Comments

JavaScript closure and IE memory leak

2006-10-24 +8 Update: According to IE 7 vs IE 6, IE 7 seems to have solved the memory leaks. Cheers! 2006-09-24 +8 Update: See the follow up "Betty: Your umbrella leaks, Professor Boffin!"    —- Look, Listen and Learn IE leaks memory like … Continue reading

Posted in JavaScript | 3 Comments