Skip to content

Follow up - Remove all innerHTML += for consistency sake #2159

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

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

WebReflection
Copy link
Contributor

Description

This is just a followup for this MR #2151 and it uses the right tool for the job, making the code also more consistent across JS/Python code.

Changes

  • use insertAdjacentHTML instead of innerHTML +=
  • test everything works fine

PyEditor test:

# doubled a
i = 0
while i < 5:
    i = i + 1
    print(i)
    import asyncio
    await asyncio.sleep(1)

# this append an error without trashing the layout
print(shenanigans)

Checklist

  • All tests pass locally
  • I have updated CHANGELOG.md
  • I have created documentation for this(if applicable)

@WebReflection WebReflection requested a review from ntoll September 11, 2024 09:40
@WebReflection WebReflection merged commit ee3cd76 into pyscript:main Sep 11, 2024
2 checks passed
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.

2 participants