-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renames
$.hydrateElement()
to $.hydrate()
.
This function serves the purpose of hydrating a given element and is the better fit for that name. The original implementation of `$.hydrate()` has been renamed to `$.read()`. This means we now have three functions which serve the purpose of "get an element from shadow DOM and do something useful with it". To break down the differences: * `$.query()` - Queries the shadow DOM for the element and returns it unmodified and with no side effects. Not intended for custom elements because they are possibly not hydrated yet. * `$.read()` - Queries the shadow DOM for the element and converts it to a more useful representation with no side effects (parses `textContent` to a `Number`, parses JSON from an attribute, etc.). Not intended for custom elements because they are possibly not hydrated yet. * `$.hydrate()` - Queries the shadow DOM for the custom element and triggers hydration with the provided props, returning the hydrated element. This is specifically for custom elements and side-effectfully triggers hydration.
- Loading branch information
Showing
4 changed files
with
6 additions
and
8 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