If you are encountering odd errors being thrown by Safari 6 on both iOS and OS X when compiling Handlebars templates, this is how I worked around it.
This comes up a lot on IRC channels and around the web: confusion about the difference between target and currentTarget on a DOM event object.
All major browsers fire a "resize" event on the window object when the browser is resized. This can be extremely useful for managing complex layouts that might not be possible with pure CSS. The problem is that certain browsers fire multiple resize events while the user resizes the window. Generally, this is harmless or even desirable, but if you have to do expensive DOM manipulation on resize, then it becomes quite undesirable. Unfortunately, browsers do not implement a "resizestop" event - which would be handy. Thankfully, we can sort of emulate a "resizestop" event using JavaScript.
I recently wrote a small script for caching results of jQuery calls, which I've titled jQuery DOM Cache. It works just like jQuery proper in that you pass it a selector and it returns a collection of matching DOM elements. The difference is that it stores the result of each selector you pass it for recall later.