-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
Sorry, it seems that I cannot assign to more than one person. @ebidel, @robdodson, can you review? Thanks. |
Shadow DOM provides encapsulation by hiding DOM subtrees under a | ||
shadow root, which can be accessed using the **shadowRoot** property: | ||
|
||
this.shadowRoot.querySelector('div'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it is possible do this.shadowRoot.querySelector
, I believe it is a discouraged practice. It's possible for someone to subclass your element, and then this.shadowRoot.querySelector
would not refer to the correct shadowRoot
. The recommendation is to use automatic node finding and give the element you're after an id
. See this thread on Github.
@ebidel what are your thoughts on this?
@robdodson Patch uploaded. PTAL? |
--> | ||
|
||
<!-- | ||
# Binding to a Computed Property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Defining computed properties"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing it "Using a Computed Property", which is pretty neutral.
Reviewed |
@ebidel @robdodson Patch addressing comments uploaded. Please review. |
LGTM |
@robdodson @ebidel
Three more recipes: