Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / misc / announce.es6.js
index 868ac24f028cf5396c21013a9bc5d95c89e7a2d8..2d852f7bf191f1c94d6b77dc5cfc07cceda08d56 100644 (file)
@@ -18,7 +18,7 @@
  *   });
  */
 
-(function (Drupal, debounce) {
+(function(Drupal, debounce) {
   let liveElement;
   const announcements = [];
 
@@ -28,7 +28,7 @@
    * @type {Drupal~behavior}
    *
    * @prop {Drupal~behaviorAttach} attach
-   *   Attaches the behavior for drupalAnnouce.
+   *   Attaches the behavior for drupalAnnounce.
    */
   Drupal.behaviors.drupalAnnounce = {
     attach(context) {
    *
    * @see http://www.w3.org/WAI/PF/aria-practices/#liveprops
    */
-  Drupal.announce = function (text, priority) {
+  Drupal.announce = function(text, priority) {
     // Save the text and priority into a closure variable. Multiple simultaneous
     // announcements will be concatenated and read in sequence.
     announcements.push({
     // Immediately invoke the function that debounce returns. 200 ms is right at
     // the cusp where humans notice a pause, so we will wait
     // at most this much time before the set of queued announcements is read.
-    return (debounce(announce, 200)());
+    return debounce(announce, 200)();
   };
-}(Drupal, Drupal.debounce));
+})(Drupal, Drupal.debounce);