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

prepend list elements instead of replacing HTML body on AJAX update #12

Merged
merged 1 commit into from
May 1, 2020

Conversation

stklcode
Copy link
Owner

@stklcode stklcode commented May 1, 2020

Resolves #9

Replacing the body by prepending HTML results in the full content being re-rendered. This can be a performance issue, but is definitely annoying when embedding media in ticks.

We now create a temporary node and move each child node to the container instead of replacing innerHTML. More elegant spread operator solution ( t.e.prepend( ...n.childNodes ) )not used by intention, as it breaks IE support (there's always someone who still need is).

Replacing the body by prepending HTML results in the full content
being re-rendered. This can be a performance issue, but is definitely
annoying when embedding media in ticks.
@stklcode stklcode added the enhancement New feature or request label May 1, 2020
@stklcode stklcode added this to the 1.1 milestone May 1, 2020
@stklcode stklcode self-assigned this May 1, 2020
@stklcode stklcode merged commit 6ed625d into develop May 1, 2020
@stklcode stklcode deleted the feature/no-rerender branch May 1, 2020 12:52
stklcode added a commit that referenced this pull request May 2, 2020
Replacing the body by prepending HTML results in the full content
being re-rendered. This can be a performance issue, but is definitely
annoying when embedding media in ticks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant