Skip to content

LWC appears to be removing properties from DOM elements #3336

Open
@simonsarris

Description

@simonsarris

Hello, I am an author of the diagramming library GoJS. Recently, GoJS has been breaking in LWC for customers due to, I think, DOM modification on LWC's part. It is difficult to debug exactly what the problem is, but it seems that LWC, at least with Lightning Web Security turned on, is removing properties from DOM elements.

In GoJS we attach a _diagram property to an HTML Div and HTML Canvas:

image

This is used for example during events, like dragging and dropping from one Diagram to another, to identify drop targets. It seems like LWC with web security turned on is removing this property from the DOM elements that GoJS creates, causing the events to fail.

Is this intentional behavior on the part of LWC? Is there some way LWC can prevent this modification of the DOM elements our library creates? Or some option our clients can set so that it does not happen?

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions