constructor()

in src/embed.ts [215:237]


  constructor(service: Service, element: HTMLElement, config: IEmbedConfigurationBase, iframe?: HTMLIFrameElement, phasedRender?: boolean, isBootstrap?: boolean) {
    if (autoAuthInEmbedUrl(config.embedUrl)) {
      throw new Error(EmbedUrlNotSupported);
    }

    Array.prototype.push.apply(this.allowedEvents, Embed.allowedEvents);
    this.eventHandlers = [];
    this.service = service;
    this.element = element;
    this.iframe = iframe;
    this.iframeLoaded = false;
    this.embedtype = config.type.toLowerCase();
    this.commands = [];
    this.groups = [];

    this.populateConfig(config, isBootstrap);

    if (this.embedtype === 'create') {
      this.setIframe(false /* set EventListener to call create() on 'load' event*/, phasedRender, isBootstrap);
    } else {
      this.setIframe(true /* set EventListener to call load() on 'load' event*/, phasedRender, isBootstrap);
    }
  }