getOrCreateItem function ✓ 100.0%

Last updated: 2026-03-04T23:21:38.399Z

Metrics

LOC: 13 Complexity: 2 Params: 1 Coverage: 100.0% (8/8 lines, 0x executed)

Signature

getOrCreateItem(field: FormField): : HTMLElement

Source Code

  function getOrCreateItem(field: FormField): HTMLElement {
    const key = field.selector;
    let item = fieldItems.get(key);
    if (!item) {
      item = document.createElement("div");
      item.className = "fa-progress-item";
      list.appendChild(item);
      fieldItems.set(key, item);
      // Auto-scroll to bottom
      container.scrollTop = container.scrollHeight;
    }
    return item;
  }

No outgoing dependencies.

Impact (Incoming)

graph LR getOrCreateItem["getOrCreateItem"] addDetecting["addDetecting"] updateDetected["updateDetected"] addFilling["addFilling"] updateFilled["updateFilled"] updateError["updateError"] addDetecting -->|calls| getOrCreateItem updateDetected -->|calls| getOrCreateItem addFilling -->|calls| getOrCreateItem updateFilled -->|calls| getOrCreateItem updateError -->|calls| getOrCreateItem style getOrCreateItem fill:#dbeafe,stroke:#2563eb,stroke-width:2px click getOrCreateItem "be177131e457a774.html" click addDetecting "c905905d51da03c4.html" click updateDetected "9b49f309b5fbb5e7.html" click addFilling "524532e8edf7313a.html" click updateFilled "4e5e87e82f7512e3.html" click updateError "a1d61ed37f97aef4.html"
SourceType
addDetecting calls
updateDetected calls
addFilling calls
updateFilled calls
updateError calls