configure operations for morph and replace #599
Merged
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.
Type of PR (feature, enhancement, bug fix, etc.)
Feature
Description
Allow overriding the default CableReady operations used by page and selector morphs via the initializer. By default, these values are:
The actual options passed to these operations is unchanged; it's up to the developer to implement a custom CableReady operation that handles the data coming from the server.
If you are using this feature, be sure to be aware of the options being sent to the client by the page broadcaster, as well as the selector broadcaster morph and replace mechanisms.
For reference, here is the existing CableReady morph and inner_html operations, which could serve as a starting point.
Why should this be added
children_only: false
. Note that this will likely interfere with normal SR operations, so consider it a sharp knife.Checklist