MCPcopy
hub / github.com/dvanoni/notero / getXULElementById

Function getXULElementById

src/content/utils/elements.ts:21–26  ·  view source on GitHub ↗
(
  id: string,
)

Source from the content-addressed store, hash-verified

19
20// oxlint-disable-next-line typescript/no-unnecessary-type-parameters
21export function getXULElementById<E extends XUL.XULElement>(
22 id: string,
23): E | null {
24 // oxlint-disable-next-line typescript/no-unsafe-type-assertion
25 return document.getElementById(id) as E | null;
26}
27
28export function isXULElement(target: EventTarget): target is XUL.XULElement {
29 return 'namespaceURI' in target && target.namespaceURI === XUL_NS;

Callers 1

initMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected