# JavaScript embed won’t display embed, console log shows: Failed to execute postMessage on DOMWindow…

**URL:** <https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374>\
**Category:** Support\
**Created:** [November 5, 2020, 8:58pm UTC](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374 "2020-11-05T20:58:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![seeminglee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/seeminglee/32/199310_2.png) [@seeminglee](https://meta.discourse.org/u/seeminglee)\
**Post date:** [November 5, 2020, 8:58pm UTC](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374/1 "2020-11-05T20:58:52Z")

</div>

Hi, I have this same exact error when trying to integrate javascript embedding on our site.

- Blog Post: [https://royaleapi.com/blog/season3](https://royaleapi.com/blog/season3)
- Discourse site: [https://discuss.royaleapi.com](https://discuss.royaleapi.com)

I have looked at the related topics and also Google but I am not entirely sure what I need to do to fix this. Thanks!

[edit] Since I don’t want to show this error message all over the time, I’ve enabled it on this one single old post only.

Embed settings:

 ![Screen Shot 2020-11-06 at 5.56.06 PM](https://global.discourse-cdn.com/meta/original/3X/b/b/bbb7806d6c80fff16302e9852a87da44354ca104.png)

Settings tried:

```plaintext
host: royaleapi.com
path allowed: /blog/.*

host: royaleapi.com
path allowed: 

```

I’ve also enabled cors origin for these domains:

- `https://royaleapi.com`
- `https://cdn.royaleapi.com`

And also added `DISCOURSE_ENABLE_CORS: true` in the ENV inside `app.yml` so I am a bit stuck here…

---

_[View the full topic](https://meta.discourse.org/t/javascript-embed-won-t-display-embed-console-log-shows-failed-to-execute-postmessage-on-domwindow/169374)._
