Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.$ is undefined on attached() with native ShadowDom #3930

Closed
kevinpschaaf opened this issue Sep 10, 2016 · 4 comments
Closed

this.$ is undefined on attached() with native ShadowDom #3930

kevinpschaaf opened this issue Sep 10, 2016 · 4 comments

Comments

@kevinpschaaf
Copy link
Member

From @valdrinkoshi on August 26, 2016 22:35

x-1 contains a x-2 in its shadowRoot.
When x-2's attached is invoked, this.$ is undefined (native ShadowDom)

<dom-module id="x-1">
  <template>
    <style>
      :host {
        display: block;
        padding: 10px;
        border: 1px solid;
      }
    </style>
    <x-2>
      <content></content>
      <slot></slot>
    </x-2>
  </template>
  <script>
    Polymer({
      is: 'x-1'
    });
  </script>
</dom-module>


<dom-module id="x-2">
  <template>
    <div id="wrapper">
      <content id="content"></content>
      <slot id="slot"></slot>
    </div>
  </template>
  <script>
    Polymer({
      is: 'x-2',
      attached: function() {
        console.log(this.$);
      }
    });
  </script>
</dom-module>

<x-1>
  <div> hello </div>
</x-1>

Copied from original issue: PolymerLabs/alacarte#96

@kevinpschaaf
Copy link
Member Author

From @valdrinkoshi on August 26, 2016 22:43

@sorvell is this related to https://github.com/PolymerLabs/alacarte/issues/71?

@kevinpschaaf
Copy link
Member Author

From @sorvell on August 26, 2016 23:29

yes

@sorvell
Copy link
Contributor

sorvell commented Sep 10, 2016

Will be addressed via #3933.

sorvell pushed a commit that referenced this issue Sep 13, 2016
Ensure dom is attached after is has been readied.
@kevinpschaaf
Copy link
Member Author

Resolved via #3947

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

No branches or pull requests

2 participants