How to use the @lwc/features.ENABLE_HTML_COLLECTIONS_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 / element.ts View on Github external
value(this: HTMLBodyElement): HTMLCollectionOf<element> {
                const elements = arrayFromCollection(
                    elementGetElementsByClassName.apply(
                        this,
                        ArraySlice.call(arguments) as [string]
                    )
                ) as Element[];

                if (!featureFlags.ENABLE_HTML_COLLECTIONS_PATCH) {
                    return createStaticHTMLCollection(
                        getNonPatchedFilteredArrayOfNodes(this, elements)
                    );
                }

                const filteredResults = getFilteredArrayOfNodes(
                    this,
                    elements,
                    ShadowDomSemantic.Enabled
                );
                return createStaticHTMLCollection(filteredResults);
            },
            writable: true,</element>
github salesforce / lwc / packages / @lwc / synthetic-shadow / src / faux-shadow / element.ts View on Github external
value(this: HTMLBodyElement): HTMLCollectionOf<element> {
                const elements = arrayFromCollection(
                    elementGetElementsByTagName.apply(this, ArraySlice.call(arguments) as [string])
                ) as Element[];

                if (!featureFlags.ENABLE_HTML_COLLECTIONS_PATCH) {
                    return createStaticHTMLCollection(
                        getNonPatchedFilteredArrayOfNodes(this, elements)
                    );
                }

                const filteredResults = getFilteredArrayOfNodes(
                    this,
                    elements,
                    ShadowDomSemantic.Enabled
                );
                return createStaticHTMLCollection(filteredResults);
            },
            writable: true,</element>