Skip to content

Conversation

@bytecii
Copy link
Collaborator

@bytecii bytecii commented Feb 11, 2026

Description

Sometimes eigent generates the interactive htmls but cannot render / interact usually because of we now only allow one javascript script (js from https://cdn.amplitude.com).

Now add as many as https allowlist as possible

Fixes #1233

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@bytecii bytecii self-assigned this Feb 11, 2026
@bytecii bytecii marked this pull request as ready for review February 11, 2026 22:59
@bytecii bytecii changed the title fix: allow js scipts for any https origin fix: allow js scipts for most https origin Feb 11, 2026
Comment on lines 1041 to 1043
sandbox="allow-scripts allow-forms"
sandbox="allow-scripts allow-forms allow-same-origin"
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we remove allow-same-origin? When an iframe enables both allow-scripts and allow-same-origin, and uses srcDoc (thus sharing the same origin as the parent page), scripts inside the frame effectively gain the same privileges as the main application — allowing them to access the parent DOM, read sensitive data, and even remove the sandbox, rendering the isolation meaningless from a security perspective. check https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we removed that, many demo examples will not be correctly shown.

Copy link
Contributor

Choose a reason for hiding this comment

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

would using blob URL instead of srcDoc could resolve this issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

For this trade-off, the most efficient approach seems to be simply removing allow-same-origin. It’s mainly used for localStorage, which isn’t typically required for 3D rendering. What do you think?
@bytecii

Copy link
Contributor

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

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

thanks @bytecii , I will remove allow-same-origin for now and merge this PR to move things forward first, if we have better solution we can add another enhance PR later

@Wendong-Fan Wendong-Fan added this to the Sprint 14 milestone Feb 12, 2026
@Wendong-Fan Wendong-Fan merged commit c5ec78e into main Feb 12, 2026
7 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.

[Feature Request] Support rendering for HTML 3D assets

3 participants