Conversation
834bd7a to
be97fd2
Compare
477d42e to
a5863dc
Compare
15ff4e8 to
c5c51ab
Compare
lippserd
commented
Jan 9, 2023
ad3f164 to
e2b718f
Compare
lippserd
commented
Jan 9, 2023
lippserd
commented
Jan 9, 2023
Member
Author
lippserd
left a comment
There was a problem hiding this comment.
Although this requires more effort, I would rather test the expected HTML instead of asserting that the output is not the same, as this could be caused by anything.
Member
Author
|
@TAINCER Please rebase. |
Member
Author
|
@TAINCER @nilmberg has found that by keeping a reference to |
7d84d39 to
34a7d97
Compare
nilmerg
reviewed
Jan 20, 2023
nilmerg
reviewed
Jan 20, 2023
Open
After cloning elements, each own attribute callback must be rebound so that the clones continue to work together.
We already have subclasses that override ensureAssembled() to execute code before assemble() is called. From now on, initAssemble() should be used for such purposes. initAssemble() is also introduced with the idea that it will be used to set the object ID used for the rebinding callbacks in BaseHtmlElement.
Currently the object ID is only set if the element has attributes. This made sense since callbacks only need to be rebound after cloning the element if attributes are set. However, with upcoming changes we will also rebind callbacks of all content elements so that the object id needs to be available in cases where the element has no attributes but content.
…ively Instead of cloning the content of each content element individually, the entire content is cloned once, also preserving the object graph.
Subclasses of HtmlDocument that need to adjust the cloned content, for example to rebind callbacks, can now use a promise resolved with an SplObjectStorage that provides each original and its cloned element.
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.
No description provided.