Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove deprecated contextmenu html global attribute #4834

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

ekashida
Copy link
Member

Details

Remove support for contextmenu global html attribute that was only ever implemented in Firefox and has since been removed from Firefox.

Does this pull request introduce a breaking change?

Unlikely, as there isn't a single browser that does anything with this attribute. Even when it was implemented, it was only supported by Firefox.

@ekashida ekashida requested a review from a team as a code owner November 12, 2024 03:55
Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have the potential for breaking changes? Why remove it?

@ekashida
Copy link
Member Author

@nolanlawson I'm proposing to remove it because it didn't feel right adding reflection support for it in ssr-compiler and engine-server.

@ekashida
Copy link
Member Author

I was doing the breaking change analysis that we discussed earlier when I realized that CSR doesn't even provide reflection for contextmenu. These global attributes are the only ones that reflect in LWC, so engine-dom does not apply any special treatment for contextmenu aside from the "ambiguous property" compiler error.

Current engine-server behavior for contextmenu:

  • ❌ When set as property, reflects as an attribute
  • When set as an attribute (declarative)
    • ✅ Host element renders the attribute
    • ✅ Does not reflect as a property
  • ✅ When set as an attribute (imperative)
    • ✅ Does not reflect as a property

So the only thing that this PR will break is that setting this.contextMenu will no longer reflect as an attribute in engine-server.

Copy link
Contributor

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mildly breaking for engine-server, so low-risk. Let's do it!

@ekashida ekashida merged commit 29a641e into master Nov 13, 2024
11 checks passed
@ekashida ekashida deleted the ekashida/contextmenu branch November 13, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants