Adding js Alert message handling to poltergeist master