How to tell when Ionic has loaded in plain JS

Does Ionic have a means of notifying when it’s loaded. I’m uisng no framework and loading it in a script tag. I get errors if I try call Ionic methods immediately on an ionic component, for example, calling getInputElement() on an ion-input returns “getInputElement is not a function”

At the moment I have an ionicIsLoaded() function that just runs a loop until window.Ionic is available but that seems wrong.