whenDefined

The whenDefined() method of the CustomElementRegistry interface returns a Promise that resolves when the named element is defined.

MDN Reference