Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293926

The use of JS_LIBRARY in system_library() is confusing

$
0
0

Currently, some libraries in system_library() are explicitly put into group JS_LIBRARY, while some others have no 'group' value assigned. For example, jQuery UI Core is explicitly put into group JS_LIBRARY, whereas jQuery UI Accordion has no group value set. This makes one think accordion is put in group JS_DEFAULT, however, this is not the case, as everything added with drupal_add_library() is automatically put in group JS_LIBRARY by this line of code:
$added[$module][$name] = drupal_process_attached($elements, JS_LIBRARY, TRUE, $every_page);

To clean up this incomprehensible mess, we should either
* specify a 'group' value JS_LIBRARY for every library (instead of not specifying it at all), or
* remove the 'group' value whenever it matches the default value.


Viewing all articles
Browse latest Browse all 293926

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>