diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 01d82a3710..361b9469d9 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -78,6 +78,11 @@ source, template_path = Loader(engine).load_template_source(path) %>${source | n, decode.utf8} <%def name="require_module(module_name, class_name)"> + <%doc> + Loads Javascript onto your page synchronously. + Uses RequireJS in development and a plain script tag in production. + Use this form of require_module for all new code. + % if not settings.REQUIRE_DEBUG: % endif @@ -91,6 +96,11 @@ source, template_path = Loader(engine).load_template_source(path) <%def name="require_module_async(module_name, class_name)"> + <%doc> + Legacy mode of require_module that operates asynchronously, required for certain edge cases + (notably where Javascript is required outside of a <%block name="js_extra" or "headextra"). + Do not use for any new code; instead create a factory and use require_module above. +