Updates to JavaScript documentation based on design discussions