Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**
getDeepSelection() {
// try and obtain the selection from the nearest shadow
// which would give us the selection object when running native ShadowDOM
// with fallback support for the entire window which would imply Shady
// native API
if (this.shadowRoot.getSelection) {
return this.shadowRoot.getSelection();
}
// ponyfill from google
else if (getRange(this.__outlineNode.parentNode)) {
return getRange(this.__outlineNode.parentNode);
}
// missed on both, hope the normal one will work
return window.getSelection();
}
/**