fix(browser_adapter): element.matches only available with prefix (IE11)
This commit is contained in:
parent
92c2c33a84
commit
a393f84fa4
|
@ -279,7 +279,8 @@ setTitle(newTitle: string) {
|
||||||
document.title = newTitle || '';
|
document.title = newTitle || '';
|
||||||
}
|
}
|
||||||
elementMatches(n, selector: string): boolean {
|
elementMatches(n, selector: string): boolean {
|
||||||
return n instanceof HTMLElement && n.matches(selector);
|
return n instanceof HTMLElement && n.matches ? n.matches(selector) :
|
||||||
|
n.msMatchesSelector(selector);
|
||||||
}
|
}
|
||||||
isTemplateElement(el: any): boolean {
|
isTemplateElement(el: any): boolean {
|
||||||
return el instanceof HTMLElement && el.nodeName == "TEMPLATE";
|
return el instanceof HTMLElement && el.nodeName == "TEMPLATE";
|
||||||
|
|
Loading…
Reference in New Issue