-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Outlets: Add observers for controller element attributes
With the current Outlet implementation, they're only ever connected or disconnected when an element _matching_ the outlet selector connects or disconnects. The selector _declared on the controller_ element can only ever be set once: when it's connected. If that attribute ever changes (for example, when it's set to a new value or removed entirely), the outlets are not updated. This commit adds test coverage to ensure the list of outlets and their items is synchronized with changes on both sides: when matching elements are connected and disconnected _as well as_ when the selector that dictates whether or not they match is added, updated, or removed. To do so, this commit extends the `SelectorObserver` to also manage the lifecycle of an `AttributeObserver` instance alongside its internally managed `ElementObserver`.
- Loading branch information
1 parent
6b3054f
commit e23e112
Showing
5 changed files
with
164 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters