# HTML embed not working

**URL:** <https://community.weweb.io/t/html-embed-not-working/18703>\
**Category:** Ask us anything\
**Tags:** design\
**Created:** [June 12, 2025, 7:03am UTC](https://community.weweb.io/t/html-embed-not-working/18703 "2025-06-12T07:03:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom12345](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@tom12345](https://community.weweb.io/u/tom12345)\
**Post date:** [June 12, 2025, 7:03am UTC](https://community.weweb.io/t/html-embed-not-working/18703/1 "2025-06-12T07:03:33Z")

</div>

Hello,

I’m trying to use an HTML embed in WeWeb, but I keep encountering this error:

> “Content Security Policy of your site blocks the use of ‘eval’ in JavaScript.”

The issue is that I’m not using `eval()` in my own code at all. After some investigation, it seems that WeWeb itself relies on `eval()` internally, yet the platform’s own Content Security Policy (CSP) is blocking its use.

As a result, nothing loads or functions properly—every attempt to use an HTML embed triggers this CSP error.

To test further, I even created a brand new project with nothing added, and upon publishing, the same `eval()` error appeared. This suggests the problem is rooted in WeWeb’s base configuration rather than anything in my custom code.

It seems like a contradiction: WeWeb appears to require `eval()` for embeds or other functionality, but its own CSP settings prevent it from running. Could you please confirm if this is a known issue or a bug?

Here is my weweb page link that isnt loding the chat I have in html-embed: [https://e66fefdc-09f6-4e38-995d-c8e1cbda74bc.weweb-preview.io/](https://e66fefdc-09f6-4e38-995d-c8e1cbda74bc.weweb-preview.io/)

However this does not work and cant be used to message and it should look like below:

 ![Screenshot 2025-06-12 100459](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0429afc50ee73c3d41c45b4995072f7637832aef.png)

But nothing is loading or working in html

Any guidance or workaround would be greatly appreciated.

Thank you!

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [June 12, 2025, 1:01pm UTC](https://community.weweb.io/t/html-embed-not-working/18703/2 "2025-06-12T13:01:47Z")

</div>

the actual error related to the embed not working is `Uncaught Error: <n8nchatui-inpage> element not found.`  
Weweb html element renders the html in the page later than when the script you are using executes. It’s a timing problem, you need to load the script after the element is rendered in the page.

---

<div class="post-metadata">

**Author:** ![tom12345](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@tom12345](https://community.weweb.io/u/tom12345)\
**Post date:** [June 12, 2025, 1:28pm UTC](https://community.weweb.io/t/html-embed-not-working/18703/3 "2025-06-12T13:28:32Z")

</div>

Thank you very much for the reply I appreciate it.

Can you please tell me how to fix timing? How to load script after element renders ?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [June 12, 2025, 1:54pm UTC](https://community.weweb.io/t/html-embed-not-working/18703/4 "2025-06-12T13:54:42Z")

</div>

A minimal setup is: add a workflow “on mounted” on the html element and use a javascript action to create a script tag with the source of the script and append it to the document. Use `wwLib.getFrontDocument()` every time you would use `document`.  
Also keep the option “refresh on resize” off in the style panel of the html element.
