added simple event trigger functionality for phantomjs