- foreach ( $this->moduleScripts as $name ) {
- $module = $rl->getModule( $name );
- if ( !$module ) {
- continue;
- }
-
- $group = $module->getGroup();
- $context = $this->getContext( $group, ResourceLoaderModule::TYPE_SCRIPTS );
- if ( $module->isKnownEmpty( $context ) ) {
- // Avoid needless request for empty module
- $data['states'][$name] = 'ready';
- } else {
- // Load from load.php?only=scripts via <script src></script>
- $data['scripts'][] = $name;
-
- // Avoid duplicate request from mw.loader
- $data['states'][$name] = 'loading';
- }
- }
-