That's great, Michael!
I've tried to get it not to create a listener if the taxonomy doesn't have any posts (since getElementById throws a javascript error for the taxonomy that is null), but was unable to do it. I can't even figure out where the global field is being set. sheesh)
For now, I'll just have to not create a widget in the sidebar until I know there are posts in it. So I add it, and if I just get a title, then I remove it.
I'm really looking forward to having it not even spit out a title in the sidebar unless the taxonomy is actually populated with posts. I'm thinking that could all happen in one step, sort of? So you would still be able to create the widget in the sidebar, but if a taxonomy had no posts, it wouldn't create output or a listener. And then later, when posts got added to that one, it would print the title and the list, and create the listener.
Am I asking too much? I certainly haven't been able to do it, but I'm really new at both php and javascript.
I appreciate all you're doing!
Cyd