diff --git a/netbox/project-static/src/util.ts b/netbox/project-static/src/util.ts index a74e290e4..d43c3af25 100644 --- a/netbox/project-static/src/util.ts +++ b/netbox/project-static/src/util.ts @@ -148,6 +148,10 @@ export function* getElements( } } +export function getElement(id: string): Nullable { + return document.getElementById(id) as Nullable; +} + /** * scrollTo() wrapper that calculates a Y offset relative to `element`, but also factors in an * offset relative to div#content-title. This ensures we scroll to the element, but leave enough