<!-- Instructions: https://github.com/PolymerElements/paper-toggle-button/CONTRIBUTING.md#filing-issues --> ### Description <!-- Example: The `paper-foo` element causes the page to turn pink when clicked. --> I'm quite new to polymer so this might be a stupid question, but how do I change the content inside this button elmement? When I create an Element I would write: ``` <paper-toggle-button checked>Button 1</paper-toggle-button> ``` and it works great, but how can I programmaticly change the 'Button 1' text? I searched here: https://elements.polymer-project.org/elements/paper-toggle-button And tired: ``` let b = document.createElement('paper-toggle-button'); b.innerHTML = 'My custom text'; document.body.append(b); ``` But this overrides the internal dom inside the button.. I want to use d3 to create these Elements dynamically. Thanks.
Description
I'm quite new to polymer so this might be a stupid question, but how do I change the content inside this button elmement?
When I create an Element I would write:
and it works great, but how can I programmaticly change the 'Button 1' text?
I searched here: https://elements.polymer-project.org/elements/paper-toggle-button
And tired:
But this overrides the internal dom inside the button..
I want to use d3 to create these Elements dynamically.
Thanks.