PageSourceSearch

https://www.senate.gov/resources/assets/js/layout/app-main-menu/app-main-menu.js

js senate.gov collected 2026-09-24 06:23:15 UTC 922 bytes, 32 lines download raw bytes

1class MainMenuComponent extends HTMLElement {
2    async connectedCallback() {
3
4   
5        if (this.dataset.initialized === "true") return;
6        this.dataset.initialized = "true";
7
8        const url = new URL('./app-main-menu.html', import.meta.url);
9        const html = await fetch(url).then(r => r.text());
10        this.innerHTML = html;
11
12        const activeMenu = this.getAttribute('active-menu');
13
14   
15        await customElements.whenDefined('primarymenu-component');
16
17        const primaryMenu = this.querySelector('primarymenu-component');
18        if (!primaryMenu) return;
19
20        if (activeMenu) {
21            primaryMenu.setAttribute('active-menu', activeMenu);
22        }
23
24        this.dispatchEvent(
25            new CustomEvent("component-ready", {
26                bubbles: true
27            })
28        );
29    }
30}
31
32customElements.define('app-main-menu', MainMenuComponent);

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.