Skip to content

Unable to extend iframe #580

Description

@robdodson

I was just messing around with type extensions and noticed that extending iframe throws the following error.

Uncaught HierarchyRequestError: Failed to execute 'createShadowRoot' on 'Element': Author-created shadow roots are disabled for this element.

ex:

<polymer-element name="x-iframe" extends="iframe">
  <template>
    <h1>Hello from x-iframe</h1>
  </template>
  <script>
    Polymer('x-iframe', {

    });
  </script>
</polymer-element>

<iframe is="x-iframe"></iframe>```

I didn't see any mention of this in the custom elements or shadow DOM specs. Is this behavior explained more elsewhere?

Activity

  1. dfreedm commented on Jun 30, 2014

    @dfreedm
    Member

    There are more than a few elements that you cannot add ShadowDOM to in Chrome: https://code.google.com/p/chromium/issues/detail?id=234020

    I'm not sure if adding a shadowdom to iframe ever really makes sense, since it would make the contents from the frame hidden forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions