Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
return;
}
let outlet = document.createElement('div');
addClass(outlet, CLASS_NAMES.OUTLET);
let container = this.renderTemplate(this.component.containerTemplate, { context, uid, container: el, focus, outlet });
if (container instanceof ElementNode) {
container = container.render(dom({ doc: document }));
}
this.container = container;
hideElement(this.container);
appendChild(el, this.container);
if (this.driver.renderedIntoContainer) {
this.element = outlet;
hideElement(this.element);
if (!this.element) {
throw new Error('Could not find element to render component into');
}
hideElement(this.element);
}
this.clean.register('destroyContainerTemplate', () => {
if (this.container && this.container.parentNode) {
}
return;
}
var outlet = document.createElement('div');
addClass(outlet, CLASS_NAMES.OUTLET);
var container = _this29.renderTemplate(_this29.component.containerTemplate, { context: context, uid: uid, container: el, focus: focus, outlet: outlet });
if (container instanceof ElementNode) {
container = container.render(dom({ doc: document }));
}
_this29.container = container;
hideElement(_this29.container);
appendChild(el, _this29.container);
if (_this29.driver.renderedIntoContainer) {
_this29.element = outlet;
hideElement(_this29.element);
if (!_this29.element) {
throw new Error('Could not find element to render component into');
}
hideElement(_this29.element);
}
_this29.clean.register('destroyContainerTemplate', function () {
if (_this29.container && _this29.container.parentNode) {
let outlet = document.createElement('div');
addClass(outlet, CLASS_NAMES.OUTLET);
let container = this.renderTemplate(this.component.containerTemplate, { context, uid, container: el, focus, outlet });
if (container instanceof ElementNode) {
container = container.render(dom({ doc: document }));
}
this.container = container;
hideElement(this.container);
appendChild(el, this.container);
if (this.driver.renderedIntoContainer) {
this.element = outlet;
hideElement(this.element);
if (!this.element) {
throw new Error('Could not find element to render component into');
}
hideElement(this.element);
}
this.clean.register('destroyContainerTemplate', () => {
if (this.container && this.container.parentNode) {
this.container.parentNode.removeChild(this.container);
}
delete this.container;
});
var outlet = document.createElement('div');
addClass(outlet, CLASS_NAMES.OUTLET);
var container = _this29.renderTemplate(_this29.component.containerTemplate, { context: context, uid: uid, container: el, focus: focus, outlet: outlet });
if (container instanceof ElementNode) {
container = container.render(dom({ doc: document }));
}
_this29.container = container;
hideElement(_this29.container);
appendChild(el, _this29.container);
if (_this29.driver.renderedIntoContainer) {
_this29.element = outlet;
hideElement(_this29.element);
if (!_this29.element) {
throw new Error('Could not find element to render component into');
}
hideElement(_this29.element);
}
_this29.clean.register('destroyContainerTemplate', function () {
if (_this29.container && _this29.container.parentNode) {
_this29.container.parentNode.removeChild(_this29.container);
}
delete _this29.container;
});
ParentComponent.prototype.hide = function hide() {
if (this.container) {
hideElement(this.container);
}
return this.driver.hide.call(this);
};
}).then(({ container, frame, prerenderFrame }) => {
const innerContainer = this.renderTemplate(this.component.containerTemplate, { context, uid, container, frame, prerenderFrame, doc: document });
if (innerContainer) {
if (!visible) {
hideElement(innerContainer);
}
appendChild(container, innerContainer);
this.clean.register(() => destroyElement(innerContainer));
this.proxyContainer = getProxyObject(innerContainer);
return getProxyObject(innerContainer);
}
});
}
hide() : void {
if (this.container) {
hideElement(this.container);
}
return this.driver.hide.call(this);
}
hide: function hide() {
hideElement(this.element);
}
};