Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get(this: Node): string {
if (!featureFlags.ENABLE_NODE_PATCH) {
if (isNodeShadowed(this) || isHostElement(this)) {
return textContentGetterPatched.call(this);
}
return textContentGetter.call(this);
}
// TODO [#1222]: remove global bypass
if (isGlobalPatchingSkipped(this)) {
return textContentGetter.call(this);
}
return textContentGetterPatched.call(this);
},
set: textContentSetterPatched,
value(this: Node, otherNode: Node): boolean {
if (!featureFlags.ENABLE_NODE_PATCH) {
if (otherNode == null) {
return false;
}
if (isNodeShadowed(this) || isHostElement(this)) {
return containsPatched.call(this, otherNode);
}
return contains.call(this, otherNode);
}
// TODO [#1222]: remove global bypass
if (isGlobalPatchingSkipped(this)) {
return contains.call(this, otherNode);
}
return containsPatched.call(this, otherNode);