Feb28
As we all know that in Javascript, the Window object is the global variable that contains attributes of the current opened window. An interesting part is this object also has a property called ‘window‘ which refers to itself. I’m not sure why this special object is implemented that way.
continue reading »
Feb27
Internet Explorer 6, 7 both do NOT support CSS class-chaining as a couple of articles floating around on the internet say. Basically, CSS class-chaining is used to select HTML elements which have multiple CSS classes:
For example:
<!-- single class -->
<div class="cls3">Single</div>
<!-- multiple classes -->
<div class="cls1 cls2 cls3">Multiple</div>
continue reading »
Feb13
One of the reasons quite a number of programmers don’t like Javascript because it’s weird, behaving differently on different browsers.. and hard to debug.. However, it’s quite fun or even addictive to learn JS also for that reason. Below is a brief on two mysterious properties of Javascript functions : length, and arguments.
continue reading »
Feb11
This is a quick solution to disabling browser default context menu when right-clicking in ExtJS.
Ext.getBody().on("contextmenu", Ext.emptyFn, null, {preventDefault: true});
continue reading »