Add documentation on waiting for JavaScript hooks