in authui-container/src/sign-in-ui.ts [50:75]
constructor(private readonly container: string | HTMLElement) {
this.httpClient = new HttpClient();
this.containerElement = typeof container === 'string' ? document.querySelector(container) : container;
this.loadingSpinnerElement = document.getElementById('loading-spinner');
const elements = document.getElementsByClassName('main-container');
if (elements.length > 0 && elements[0]) {
this.mainContainer = elements[0];
} else {
throw new Error(`.main-container element not found`);
}
if (!this.containerElement) {
throw new Error(`Container element ${container} not found`);
}
this.titleElement = document.getElementById('title');
if (!this.titleElement) {
throw new Error(`#title element not found`);
}
this.separatorElement = document.getElementById('separator');
if (!this.separatorElement) {
throw new Error(`#separator element not found`);
}
this.img = document.getElementById('logo') as HTMLImageElement;
if (!this.img) {
throw new Error(`#logo element not found`);
}
}