Out from under the carpet
I’ve been crazy busy lately with projects at We-Create so my RSS feed reader has been quickly filling up with unread posts. I finally took a bit of time tonight to re-visit it and came across a few gems I thought I’d share.
Debugging JavaScript
Jesse Skinner over at The Future of the Web had a great little post on debugging javascript. Basically by adding a simple function to your site:
function debug_mode() {
return location.hash == '#debug';
}
you can degub any code JavaScript:
if (debug_mode()) {
alert('alert away!');
}
and all you have to do is add #debug to the URL. Brilliant! That’s kinda an obvious thing to do so I’m not sure why didn’t I think of it. Thanks Jesse.
DOMAssistant 2.0
Robert Nyman wrote me awhile back to let me know that DOMAssistant version 2.0 has been released. New features include:
- Chainability
- AJAX Module
- Easier DOMReady
- XPath Support
These make for some great additions to the little library, good work Robert and team.
No events with innerHTML
Friendly Bit had a post about events disappearing after using innerHTML to modify the DOM. When you add events using the event attribute and then modify the parent’s innerHTML property, it seems that you’re events all go bye-bye. Check out the article for a better explanation but it’s just another reason to avoid innerHTML altogether.


