Skip to content

Why is nonObservedAttributes a function? #10

Closed Answered by lsegurado
acroyear asked this question in Q&A
Discussion options

You must be logged in to vote

It is mostly intended for complete objects that cannot be cloned. The function allows it to act as a constructor. In normal cases I take the "attributes" and clone them with a proxy, which allows the instance to not be shared between components. There are objects that cannot be cloned easily or the complexity of observing them is very high. For those cases, I use nonObservedAttributes

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@acroyear
Comment options

@lsegurado
Comment options

Answer selected by lsegurado
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants