add docs to event.js