-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify WebComponent by consolidating _init/_deinit with init/deinit.
Added childConnectedCallback and childDisconnectedCallback for subclasses to implement in order to run logic when a child is connected or disconnected. Update MotorHTMLBase and MotorHTMLNode classes. Basically added childConnectedCallback and childDisconnectedCallback methods to the base class to mirror the connections on the imperative side, which makes the API parent-to-child instead of child-to-parent. For now, the error state in which motor-nodes are attached to non-motor-node elements is ignored, and an app with such state will silently fail. It will be too complex and messy to make it work due to current Custom Elements API limitations. Some features that would help are described in issues #527 and #550 of w3c/webcomponents. This is partial work for issue #40. Next we need to make parents observe <content> or <slot> elements depending on version of the Custom Elements API in order to make ShadowDOM work.
- Loading branch information
Showing
2 changed files
with
66 additions
and
93 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