diff --git a/docs/xblock-tutorial/anatomy/javascript.rst b/docs/xblock-tutorial/anatomy/javascript.rst index 2a35721eb..e5273e23e 100644 --- a/docs/xblock-tutorial/anatomy/javascript.rst +++ b/docs/xblock-tutorial/anatomy/javascript.rst @@ -8,13 +8,13 @@ This section of the tutorial walks through the JavaScript file, `thumbs.js`_, that is part of the Thumbs XBlock in the XBlock SDK. If you completed the steps in :ref:`Build an XBlock Quick Start`, you can find -this file locally at ``xblock_development/xblock-sdk/sample_xblocks/thumbs/static/js/source/thumbs.js``. +this file locally at ``xblock_development/xblock-sdk/sample_xblocks/thumbs/static/js/src/thumbs.js``. In the XBlock JavaScript file, you define code that manages user interaction with the XBlock. The code is added to a :ref:`fragment `. -The XBlock’s JavaScript uses the runtime handler, and can use the ``children`` +The XBlock's JavaScript uses the runtime handler, and can use the ``children`` and ``childMap`` functions as needed. The JavaScript references the XBlock :ref:`fields ` @@ -29,7 +29,7 @@ Note the following details about the JavaScript file. * The function ``ThumbsBlock`` initializes the XBlock. A JavaScript function to initialize the XBlock is required. -* The ``ThumbsBlock`` function maps to the contstructor in the :ref:`XBlock +* The ``ThumbsBlock`` function maps to the constructor in the :ref:`XBlock Python file ` and provides access to its methods and fields. @@ -39,7 +39,7 @@ Note the following details about the JavaScript file. var handlerUrl = runtime.handlerUrl(element, 'vote'); -* The ``ThumbsBlock`` function includes the ``Post`` commands to increase the up +* The ``ThumbsBlock`` function includes the ``POST`` commands to increase the up and down votes in the XBlock. The XBlock JavaScript code can also use the ``children`` and ``childMap``