[fx] fix web API for Chrome: use JSON.stringify() for dispatching events