1/** 2* DO NOT EDIT THIS FILE. 3* See the following change record for more information, 4* https://www.drupal.org/node/2815083 5* @preserve 6**/ 7 8(function (Drupal, debounce) { 9 var liveElement; 10 var announcements = []; 11 Drupal.behaviors.drupalAnnounce = { 12 attach: function attach(context) { 13 if (!liveElement) { 14 liveElement = document.createElement('div'); 15 liveElement.id = 'drupal-live-announce'; 16 liveElement.className = 'visually-hidden'; 17 liveElement.setAttribute('aria-live', 'polite'); 18 liveElement.setAttribute('aria-busy', 'false'); 19 document.body.appendChild(liveElement); 20 } 21 } 22 }; 23 24 function announce() { 25 var text = []; 26 var priority = 'polite'; 27 var announcement; 28 var il = announcements.length; 29 30 for (var i = 0; i < il; i++) { 31 announcement = announcements.pop(); 32 text.unshift(announcement.text); 33 34 if (announcement.priority === 'assertive') { 35 priority = 'assertive'; 36 } 37 } 38 39 if (text.length) { 40 liveElement.innerHTML = ''; 41 liveElement.setAttribute('aria-busy', 'true'); 42 liveElement.setAttribute('aria-live', priority); 43 liveElement.innerHTML = text.join('\n'); 44 liveElement.setAttribute('aria-busy', 'false'); 45 } 46 } 47 48 Drupal.announce = function (text, priority) { 49 announcements.push({ 50 text: text, 51 priority: priority 52 }); 53 return debounce(announce, 200)(); 54 }; 55})(Drupal, Drupal.debounce);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.