commit
be3ffc1f96
@ -118,7 +118,7 @@ class Fullscreen {
|
||||
|
||||
const element = !this.prefix ? document.fullscreenElement : document[`${this.prefix}${this.property}Element`];
|
||||
|
||||
return element === this.target;
|
||||
return (element && element.shadowRoot) ? element === this.target.getRootNode().host : element === this.target;
|
||||
}
|
||||
|
||||
// Get target element
|
||||
|
@ -221,7 +221,7 @@ export function hasClass(element, className) {
|
||||
|
||||
// Element matches selector
|
||||
export function matches(element, selector) {
|
||||
const prototype = { Element };
|
||||
const prototype = Element.prototype;
|
||||
|
||||
function match() {
|
||||
return Array.from(document.querySelectorAll(selector)).includes(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user