Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: allow using script type="module" in html embed (#3107)

Oleg Isonenc05aa077db0a
diff --git a/packages/sdk-components-react/src/html-embed.tsx b/packages/sdk-components-react/src/html-embed.tsx
index 235746b083..a217a9a2c8 100644
--- a/packages/sdk-components-react/src/html-embed.tsx
+++ b/packages/sdk-components-react/src/html-embed.tsx
@@ -60,13 +60,10 @@ const execute = async (container: HTMLElement) => {
const asyncTasks: Array<ScriptTask> = [];
scripts.forEach((script) => {
- const type = script.getAttribute("type");
- if (type == null || type === "" || type === "text/javascript") {
- const tasks = script.hasAttribute("async") ? asyncTasks : syncTasks;
- tasks.push(() => {
- return insertScript(script);
- });
- }
+ const tasks = script.hasAttribute("async") ? asyncTasks : syncTasks;
+ tasks.push(() => {
+ return insertScript(script);
+ });
});
// Insert the script tags in parallel.