This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class CustomElementUtil { | |
/** | |
* workaround for @containerless subclasses (custom elements) - waiting for https://github.com/aurelia/templating/issues/140 | |
* @return previousElementSibling when given element is comment node (as it is in case of @containerless custom elements) or given element otherwise | |
*/ | |
public static getRealElement(element: Element): Element { | |
if(element.nodeType === 8) { | |
element = this.getPreviusElementSibling(element) | |
} |