add event.spec
code refactoring
DOM.ready should not break queue if any handler throws an error