MDL-68524 core: Prefetch modal registry templates
authorAndrew Nicols <andrew@nicols.co.uk>
Sat, 25 Apr 2020 12:38:35 +0000 (20:38 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 5 May 2020 02:16:10 +0000 (10:16 +0800)
lib/amd/build/modal_registry.min.js
lib/amd/build/modal_registry.min.js.map
lib/amd/src/modal_registry.js

index b01e07b..05cda33 100644 (file)
Binary files a/lib/amd/build/modal_registry.min.js and b/lib/amd/build/modal_registry.min.js differ
index baa89bb..04a952b 100644 (file)
Binary files a/lib/amd/build/modal_registry.min.js.map and b/lib/amd/build/modal_registry.min.js.map differ
index 164af17..fc7bdbc 100644 (file)
@@ -22,7 +22,7 @@
  * @copyright  2016 Ryan Wyllie <ryan@moodle.com>
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
-define(['core/notification'], function(Notification) {
+define(['core/notification', 'core/prefetch'], function(Notification, Prefetch) {
 
     // A singleton registry for all modules to access. Allows types to be
     // added at runtime.
@@ -64,6 +64,9 @@ define(['core/notification'], function(Notification) {
             module: module,
             template: template,
         };
+
+        // Prefetch the template.
+        Prefetch.prefetchTemplate(template);
     };
 
     return {