Archive: 2008

Using catch-alls to implement super in SpiderMonkey

Another thing that always been bothering me about OOP in JS is that calling super is such a pain. Some libraries do ugly hacks like checking the source (by calling toString on their constructor and method function objects) and then wrap the original function in another function that encapsulates a variable called super. Other libraries ...

Instance private, class private, package and friends

Update: This is flawed. See details at the end. This post was inspired by a post that Robert Nyman wrote a while back. At the same time I was thinking about how to achieve private fields without the memory issues. JavaScript does not have private members as understood by a lot of other object oriented ...

Just Married

Photo by our friend Stella Loh.

Google Chrome

I guess you all have downloaded Chrome already. If not, what are you waiting for? I’d like to congratulate my friends who have been working so hard on this. Congratulations Glen and Ojan. Also, I’d like to add that Chrome is totally awesome, and I’m not saying that because I work at Google. I’m saying ...

IE8 and box-sizing

One of my top feature request for IE8 was for it to support box-sizing. I’m happy to see that IE8 does support box-sizing although it has a annoying quirk. The DOM property name is not correct. The rule for translating CSS property names to DOM property names is to replace a dash followed by a ...

The Good, the Bad and the Ugly

The Good Attribute handling in the DOM is finally working. MS said that this was one of the hardest things to fix and yet they did it. hashchange events simplify history management. I wish they implemented more of the HTML5 proposals when it comes to history state management but getting an event when the hash ...

Introducing Sam And Max

Last weekend we went to the animal shelter. We were planning to get two cats and we wanted to have a look. We ended up adopting two four month old kittens. They were just too cute and we could not let them stay at the shelter another night.