Conversation
2d45f99 to
e025bfe
Compare
a6b0db2 to
367d314
Compare
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/corethat 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.tsfile, 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.appendChildis deprecated, with a newRemoteParent.appendAPI 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.insertChildBeforeis deprecated, with a newRemoteParent.insertBeforeAPI recommended instead. This matches the DOM, including the fact that the second argument can be null (in which case, the method behaves the same asappendRemoteParent.replaceChildrenis 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.updateTextis deprecated in favor of a newRemoteText.updatemethod, which is simply shorter.cc/ @developit