Skip to content

remove isNodeFromTemplate hacks to expose elements without an ownerKey #1252

Open
@caridy

Description

@caridy

Description

The method isNodeFromTemplate is confusing on itself, its semantics are really about whether a node is inside a shadow or not, maybe we should rename it to isNodeShadowed or something similar.

There is one use-case today that is forcing us to break those semantics for a very edge case:

The Problem

  • when a node is inserted manually inside an element from template, and that element does not have the lwc:dom="manual" flag specified, the node is considered as not part of the shadowRoot when running in synthetic mode. This is considered a feature for flexipages inserting aura elements inside the flexipage, while those aura elements are accessible via a global document query.

This is plain wrong, and we should fix it, but first we need to investigate how to help those folks that are using this as a feature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions