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: node imports breaking #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mxmzb
Copy link

@mxmzb mxmzb commented Nov 21, 2019

encapsuled the sandbox creation into a function, because having it plainly executing on file import will break when you want to use the package in server + client side frameworks like gatsby or next.js

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2019

💥 No Changeset

Latest commit: ab6fdfc

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -1,5 +1,9 @@
// Sandbox HTML elements
const sandbox = document.implementation.createHTMLDocument('sandbox')

function _getSandboxSafely() {
Copy link
Owner

Choose a reason for hiding this comment

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

can you make this re-use the same sandbox instance?

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