/**
- * @file
- * Add aria attribute handling for details and summary elements.
- */
+* DO NOT EDIT THIS FILE.
+* See the following change record for more information,
+* https://www.drupal.org/node/2815083
+* @preserve
+**/
(function ($, Drupal) {
-
- 'use strict';
-
- /**
- * Handles `aria-expanded` and `aria-pressed` attributes on details elements.
- *
- * @type {Drupal~behavior}
- */
Drupal.behaviors.detailsAria = {
- attach: function () {
+ attach: function attach() {
$('body').once('detailsAria').on('click.detailsAria', 'summary', function (event) {
var $summary = $(event.currentTarget);
var open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true';
});
}
};
-
-})(jQuery, Drupal);
+})(jQuery, Drupal);
\ No newline at end of file