PageSourceSearch

https://www.gll.org/assets/gll_component_library/controllers/navigation_position_controller-8f77d68e.js

js gll.org collected 2026-10-02 07:54:18 UTC 638 bytes, 26 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// Connects to data-controller="navigation-position"
4export default class extends Controller {
5  static targets = ["logo"]
6
7  connect() {
8    if (this.hasLogoTarget) {
9      const img = this.logoTarget.querySelector("img");
10      if (img) {
11        if (img.complete) {
12          this.setWidth();
13        } else {
14          img.addEventListener("load", () => this.setWidth(), { once: true });
15        }
16      } else {
17        this.setWidth();
18      }
19    }
20  }
21
22  setWidth() {
23    const width = this.logoTarget.offsetWidth;
24    this.element.style.setProperty('--width', `${width}px`);
25  }
26}

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.