How to use the @lwc/features.ENABLE_NODE_PATCH function in @lwc/features

To help you get started, we’ve selected a few @lwc/features examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / lwc / packages / @lwc / synthetic-shadow / src / faux-shadow / node.ts View on Github external
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,
github salesforce / lwc / packages / @lwc / synthetic-shadow / src / faux-shadow / node.ts View on Github external
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);