# Iframe allow attribute not working

**URL:** <https://meta.discourse.org/t/iframe-allow-attribute-not-working/127383>\
**Category:** Feature\
**Created:** [September 2, 2019, 9:10am UTC](https://meta.discourse.org/t/iframe-allow-attribute-not-working/127383 "2019-09-02T09:10:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [March 4, 2021, 9:24pm UTC](https://meta.discourse.org/t/iframe-allow-attribute-not-working/127383/5 "2021-03-04T21:24:17Z")

</div>

For security we are **very** strict of what HTML attributes can be rendered in our page when they come from user input.

What you can do to get that is:

```HTML
<div data-my-special-attr="42">
  <iframe src="http://example.com">
</div>

```

and then target _that_ with your CSS / JS selector:

```css
div[data-my-special-attr="42"] > iframe {
  border-color: pink;
}

```

---

_[View the full topic](https://meta.discourse.org/t/iframe-allow-attribute-not-working/127383)._
