You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of class fields continues to be an annoying foot-gun for Lit users, see lit/lit-element#855. While we could "fix" the elements, it would incur a significant performance penalty. This is due to needing to call delete and this putting the object into dictionary mode at least in V8.
However, elements with masked properties can be non-functional in pretty unintuitive ways. We can at least mitigate developer confusion by producing a good error message in dev mode. This would involve iterating over properties when updating is enabled and doing a hasOwnProperty check and producing an error.
Acceptance criteria
PR landed.
The text was updated successfully, but these errors were encountered:
Description
Use of class fields continues to be an annoying foot-gun for Lit users, see lit/lit-element#855. While we could "fix" the elements, it would incur a significant performance penalty. This is due to needing to call
delete
and this putting the object into dictionary mode at least in V8.However, elements with masked properties can be non-functional in pretty unintuitive ways. We can at least mitigate developer confusion by producing a good error message in dev mode. This would involve iterating over properties when updating is enabled and doing a
hasOwnProperty
check and producing an error.Acceptance criteria
PR landed.
The text was updated successfully, but these errors were encountered: