Help with JavaScript DOM

As a developer, it seems like I run into cases when I need to quickly check to see what properties or methods are available for a particular HTML tag, embedded Flash, or ActionScript, or a JavaScript function or object. I've never found the end all be all DOM resource. There are a lot of good ones, but in the case of books they seem too far removed from specific browser implementations (or I forgot to pack it). In the case of online references, they seem too broad or too focused on getting page clicks in the online analog of a sleazy 900-number (trafficking in page views rather than minutes spent on the phone.) I've seen some libraries, but they seem overly feature laden, or painful to implement.

Since I've never really discovered someone else's resource that I love, I've tended to write my own, ...each time. After iterations of writing functions to expose DOM elements via JavaScript, I finally managed to abstract the elements into their own reusable library, and located them in a place I've been able to find again (a super useful feature for a resource espousing itself as "reusable" as it turns out).

Better still, it's super simple to find and use. Professing myself as a critic of, uh, myself it seems my own litmus test for how useful something is depends on how many iterations it takes before I don't maintain it any longer, or abandon it all together. At this point, I've logged years on this one, and use it on an almost daily basis... hopefully that bodes well. Since there's really only one way to find out, I thought I'd share it and request feedback. I'm open to feature suggestions, but it's errors I'm really curious about.

Here's how to use it.

  1. Include a remote script include to load it when you want to use it. (Please don't leave it in your script's after you're done debugging, at least if you choose to call it from my web host ;-)
    ex: <script src=""></script>
  2. Call the expose method passing a reference to the object whose internals you wish to view.
    ex: ... (an html element example) ... <div id="mydiv">stuff inside the div</div> <script>expose(document.getElementById('mydiv'))</script> ... (or a form input example using an event and a reference to itself) ... <form name="myform"> <input name="myinput" onchange="expose(this)">

More Information and Resources

Related Keywords: How to expose DOM elements with JavaScript