polymer - how to change the content of the lightdom using jquery.javascript -


say have custom element written this

<custom>test<custom> 

how go changing light dom content after been resolved shadydom.

using standard $("custom").text("test1"); not works damage tree structure of shadydom

you can manipulate dom custom element properties , behavior after it's been resolved shadow or shady dom using polymer's native ready callback described here.

you don't need jquery. can use polymer() function inside element's <script> tag follows:

example code:

<script>   (function() {     polymer({       is: 'example-element',       properties: {...},       ready: function() {         // access local dom element id using this.$         this.$.header.textcontent = 'hello!';       }     });   })(); </script> 

Comments