mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-14 10:28:31 +02:00
Api: Allow Web Components to be added into templates (.xet files)
Current limitations: - display only, I haven't figured out getting values back yet - no children in the web components
This commit is contained in:
@ -148,7 +148,7 @@ export class et2_DOMWidget extends et2_widget {
|
||||
*/
|
||||
insertChild(_node, _idx) {
|
||||
super.insertChild(_node, _idx);
|
||||
if (_node.instanceOf(et2_DOMWidget) && typeof _node.hasOwnProperty('parentNode') && this.getDOMNode(this)) {
|
||||
if (_node.instanceOf && _node.instanceOf(et2_DOMWidget) && typeof _node.hasOwnProperty('parentNode') && this.getDOMNode(this)) {
|
||||
try {
|
||||
_node.setParentDOMNode(this.getDOMNode(_node));
|
||||
}
|
||||
@ -157,6 +157,10 @@ export class et2_DOMWidget extends et2_widget {
|
||||
// will probably try again in doLoadingFinished()
|
||||
}
|
||||
}
|
||||
// _node is actually a Web Component
|
||||
else if (_node instanceof Element) {
|
||||
this.getDOMNode().append(_node);
|
||||
}
|
||||
}
|
||||
isAttached() {
|
||||
return this.parentNode != null;
|
||||
|
Reference in New Issue
Block a user