Interface ModuleConfigurationCallback


Used to change the configuration object which will be used to configure RequireJS; callbacks can modify and override the configuration after it was created by the ModuleManager service based on contributed JavaScriptModuleConfigurations. This allows components, pages, mixins and services to configure Require.JS dynamically in a per-request basis by using the JavaScriptSupport.addModuleConfigurationCallback(ModuleConfigurationCallback) method. Note that RequireJS is only configured during a full page render; on Ajax requests, RequireJS will already be loaded and configured.
Since:
5.4
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    configure(JSONObject configuration)
    Receives the current configuration, which can be copied or returned, or (more typically) modified and returned.
  • Method Details

    • configure

      Receives the current configuration, which can be copied or returned, or (more typically) modified and returned.
      Parameters:
      configuration - a JSONObject containing the current configuration.
      Returns:
      a JSONObject containing the changed configuration, most probably the same one received as a parameter.