html - JavaScript plugin initialization in Polymer Shadow DOM -


i tried use this plugin polymer, did't work. use javascript version of plugin. have used domready: function{}. problem?

shadow dom:

    <link rel="import" href="../../bower_components/polymer/polymer.html"> <script src="../../assets/plugins/perfect-scrollbar/js/perfect-scrollbar.js"></script> <polymer-element name="paper-scrollbar">     <template>         <!-- begin element css -->         <link rel="stylesheet" href="../../assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css">         <style>             .scrollbar-container {                 width: 100%;                 height: 100%;                 overflow: auto;                 position: relative;                 margin: 0;             }         </style>         <!-- end element css-->         <!-- begin element html -->         <div class="scrollbar-container">             <content></content>         </div>         <!-- end element html -->     </template>     <!-- begin element javascript -->     <script>         polymer('paper-scrollbar', {             ready: function () {                 var container = document.queryselector('.scrollbar-container');                  ps.initialize(container);             }         });     </script>     <!-- end element javascript --> </polymer-element> 

the issue in plugin. doesn't work scope of elements under same class. should use unique id each dom element.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -