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

Add validation for usage of unwrap() on DOM elements #14

Closed
ravijayaramappa opened this issue Jul 23, 2019 · 1 comment
Closed

Add validation for usage of unwrap() on DOM elements #14

ravijayaramappa opened this issue Jul 23, 2019 · 1 comment

Comments

@ravijayaramappa
Copy link
Contributor

Before LWC GA, dom elements were being wrapped in a proxy. unwrap() was a way to peel away the proxy and access the native element. Post GA, lwc has stopped wrapping elements in a proxy. So the unwrap() call is basically a no-op and waste of CPU cycles.

Add an eslint rule to flag usages of unwrap() on dom elements.

@ravijayaramappa ravijayaramappa changed the title Add validation for usage of unwrap() Add validation for usage of unwrap() on DOM elements Jul 23, 2019
@pmdartus
Copy link
Member

Since it's not something that is exposed to the platform. I feel reluctant about adding such linting rule here. I will close this issue, for now, @ravijayaramappa feel free to reopen the issue if you think it's something we really need to pursue.

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

No branches or pull requests

2 participants