Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes a few API updates to
@remote-ui/core
that fix some long-standing annoyances I have had with the APIs. You can see the important part of this change in the updatedpackages/core/src/types.ts
file, but the overall goal was to get some slightly shorter names for common API methods, and to try to align closer to modern DOM APIs:RemoteParent.appendChild
is deprecated, with a newRemoteParent.append
API recommended instead. This new API matches the DOM’s version; it allows you to pass multiple children, including strings that are converted to text nodes.RemoteParent.insertChildBefore
is deprecated, with a newRemoteParent.insertBefore
API recommended instead. This matches the DOM, including the fact that the second argument can be null (in which case, the method behaves the same asappend
RemoteParent.replaceChildren
is new, and matches the DOM's API of the same name. It allows passing any number of children/ strings, and those are used to fully replace the existing children.RemoteText.updateText
is deprecated in favor of a newRemoteText.update
method, which is simply shorter.cc/ @developit