Monday 13 September 2010

Javascripting and KMLing

This morning I was doing some testing to see how anonymous functions compare to named functions when doing something like setting a click event handler for multiple elements (in javascript).

I found (using the Profiler built into Chrome's developer tools) that using named functions uses less memory and is faster than anonymous ones.

However, when I tried using jquery to add the function, I found that it used the same or less memory with anonymous functions. My guess is that jquery caches the anonymous function, making it so it's not really anonymous.

The rest of the day I was working on my google maps / earth implementation. I thought I had the basics working with google maps, so I uploaded the relevant files to the web server. But when I tried it out on the live website, I found that the iframe load event I was relying on only fires when all the images and resources in the iframe have finished loading.

So I tried various things to try and listen for the DOM in the iframe being ready instead, but didn't get anywhere.

No comments: