Adding test and docs for fireEventForElement