add documentation for new javascript functionality