Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify Element.clone() for issue #763 #1547

Closed
wants to merge 2 commits into from
Closed

Conversation

mct10
Copy link

@mct10 mct10 commented May 16, 2021

Summary
I add a private instance Document.OutputSettings to record what output setting this element itself should follow. Also, I modify NodeUtils.outputSettings, which obtains the output setting of the node. It checks whether the node is element or not. If it is element, than check if it has an ownerDocument. If it does not have an ownerDocument, it will use the element's output setting. Or it will still follow the ownerDocument's output setting.

@mct10
Copy link
Author

mct10 commented May 16, 2021

This is an attempt to solve #763

@jhy
Copy link
Owner

jhy commented Jul 9, 2021

Thanks -- but I do not want to introduce another field to every Element in the DOM, as it really adds up how much memory is used in larger documents. Particularly for a (relative) edge case need as this.

My suggestion for a fix to the original issue would be to clone the parent Owner Document and attach that to the clone instead.

@jhy jhy closed this Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants