Thats because at the moment you can't extend custom elements:

https://www.polymer-project.org/1.0/docs/devguide/registering-elements.html#type-extension

On Thursday, 16 July 2015 02:59:36 UTC+1, Darin Hensley wrote:
>
> Stackoverflow cross post 
> <http://stackoverflow.com/questions/31444119/polymer-1-0-extending-elements-paper-dialog-with-custom-element>
>
> I am am trying to create a custom element that plays a youtube video in 
> `paper-dialog`. So `videoPlayer = 
> Polymer.dom(this.root).querySelector('video-player');` inherits/has access 
> to that `paper-dialog`s `open` method, I am trying to extend my custom 
> element. It isn't working, but hopefully I am on the right track and 
> someone can show me correctly. 
>
> I am using `Polymer 1.0`, but I only have 
> https://www.polymer-project.org/0.5/docs/polymer/polymer.html#extending-other-elements
>  
> to go by for extending elements. 
>
>     <link rel="import" href=
> "../bower_components/paper-dialog/paper-dialog.html">
>     <link rel="import" href=
> "../bower_components/paper-icon-button/paper-icon-button.html">
>     <link rel="import" href=
> "../bower_components/iron-icons/iron-icons.html">
>     <link rel="import" href=
> "../bower_components/google-youtube/google-youtube.html">
>     <link rel="import" href="../bower_components/polymer/polymer.html">
>     
>     <dom-module id="video-player">
>       <template>
>           <div class="layout horizontal">
>             <paper-button dialog-dismiss>
>               <paper-icon-button icon="arrow-back"></paper-icon-button>
>             </paper-button>
>           </div>
>           <div style="height: 100%; width: 100%">
>             <google-youtube style="height: 100%;"
>               video-id="YMWd7QnXY8E"
>               rel="1"
>               start="5"
>               playsinline="0"
>               controls="2"
>               showinfo="0"
>               width="100%"
>               height="100%"
>               autoplay="1">
>             </google-youtube>
>           </div>
>       </template>
>     
>       <script>
>         Polymer({
>           is: "video-player"
>         });
>       </script>
>     </dom-module>
>
> ------------------------------------------------------------------
>
>     <paper-dialog name="video-player" extends="video-player">
>       <template>
>         <shadow></shadow>
>       </template>
>       <script>
>          Polymer();
>       </script>
>     </paper-dialog>
>
>
>
> ---------------------------------------------------
>     
>     <video-player></video-player>
>
>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/3c3d42b6-919c-47c2-9706-e801b3ca2fd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to