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

Fix Skulpt External Files #1062

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Fix Skulpt External Files #1062

merged 2 commits into from
Aug 6, 2024

Conversation

sra405
Copy link
Contributor

@sra405 sra405 commented Aug 6, 2024

Fix:

  • add external files to document body so it renders outside the shadow DOM

Why:

  • Skulpt picks up files by adding them to the DOM (see import and file read skulpt/skulpt#854 (comment))
  • this doesn't play nice with the shadow DOM and Skulpt doesn't recoginse files like .txt and .csv
  • createPortal enables us to pick a common host element (i.e. body) and attach the required div's there

Copy link

github-actions bot commented Aug 6, 2024

Copy link
Member

@conorriches conorriches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s p l e n d i d

@sra405 sra405 merged commit 2f33fc1 into main Aug 6, 2024
8 checks passed
@sra405 sra405 deleted the fix-skulpt-external-files branch August 6, 2024 17:31
@sra405 sra405 mentioned this pull request Aug 6, 2024
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