1/** 2 * ãã°ã«ã¢ãã¡ã¼ã·ã§ã³ 3 */ 4document.addEventListener('DOMContentLoaded', () => { 5 const details = document.querySelectorAll('.js-toggle'); 6 if (!details) { 7 return; 8 } 9 details.forEach((el) => { 10 const summary = el.querySelector('summary'); 11 const content = el.querySelector('.m-toggle__content'); 12 if (!summary || !content) { 13 return; 14 } 15 summary.addEventListener('click', (e) => { 16 e.preventDefault(); // detailsã®ããã©ã«ãæåãæ¢ãã 17 if (el.open) { 18 // close 19 const height = content.offsetHeight; 20 content.style.height = height + 'px'; 21 requestAnimationFrame(() => { 22 content.style.height = '0px'; 23 }); 24 content.addEventListener('transitionend', () => { 25 el.open = false; 26 content.style.height = ''; 27 }, { once: true }); 28 } 29 else { 30 // open 31 el.open = true; 32 const height = content.scrollHeight; 33 content.style.height = '0px'; 34 requestAnimationFrame(() => { 35 content.style.height = height + 'px'; 36 }); 37 content.addEventListener('transitionend', () => { 38 content.style.height = ''; 39 }, { once: true }); 40 } 41 }); 42 }); 43}); 44export {};
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.