1import { Controller } from '@hotwired/stimulus'; 2 3/** 4 * @domain UI íì ìí 5 * @concern ìì ìì ì¡´ì¬ ì¬ë¶ì ë°ë¥¸ íì/ì¨ê¹ ì í 6 * @description MutationObserverë¡ ìì ììì ì¶ê°Â·ì 거를 ê°ì§í´ 컨í ì¸ ê° ìì¼ë©´ íìíê³ ìì¼ë©´ hidden í´ëì¤ë¥¼ ë¶ì¬ ì¨ê¸°ë 컨í¸ë¡¤ë¬ 7 */ 8export default class extends Controller { 9 connect() { 10 this.toggleVisibility(); 11 this.observer = new MutationObserver(() => this.toggleVisibility()); 12 this.observer.observe(this.element, { childList: true, subtree: true }); 13 } 14 15 toggleVisibility() { 16 const hasContent = this.element.children.length > 0 || this.element.textContent.trim() !== ''; 17 this.element.classList.toggle('hidden', !hasContent); 18 } 19 20 disconnect() { 21 this.observer.disconnect(); 22 } 23}
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.