System provides a sample page in which you can test JS API, we suggest you read first how_to_use_http_push_sample_page_to_receive_system_events if you didn't.