HTML embeds no longer execute JavaScript in Editor (Preview/Live OK) — regression or intentional change?

Hi all,

Today we’ve hit an issue where JavaScript inside HTML embeds does not execute in the Wix Editor canvas, while Preview and Live sites behave correctly.

This is affecting all HTML embeds across our site, including very simple tests.

What we’re seeing:

  • Static HTML inside the embed renders in the Editor

  • <script> blocks do not execute in the Editor

  • The same embeds work normally in Preview and Live

  • This was working previously (no code changes made)

Repro (minimal test):

<div style="padding:20px;background:#4B5070;color:#fff;">
  Embed test: if you see this in Editor, embeds are rendering.
</div>

<script>
  document.body.insertAdjacentHTML(
    'beforeend',
    '<div style="padding:12px;margin-top:12px;background:#757F18;color:#fff;">JS test ran.</div>'
  );
</script>

Result:

  • In Editor: only the first div renders

  • In Preview/Live: both divs render (script runs)

This suggests the Editor is now blocking or sandboxing JavaScript execution in HTML embeds.

Question:

  • Is this an intentional Editor security/sandboxing change, or a regression?

  • If intentional, is this now the expected behavior going forward?

  • Is there any official guidance for projects using animated / JS-driven HTML embeds?

We’re fine with Preview/Live being the source of truth — but this change makes editor-based layout and iteration extremely difficult without warning.

Would appreciate clarification from Wix staff or confirmation from others seeing the same issue.

Thanks.

This is intentional - Custom Element and iFrame extensions in the Wix editors are sandboxed, and have various limitations.

This article explains in a little more detail about what this means - Custom Element Sandbox | Developer Support Center | Wix.com

And this article gives guidance on how to handle Sandboxing in the editor - Handle Sandboxing in the Editor