for example, when you load the Google Web Components <google-streetview-pano>
polymer element, the panorama slowly rotates. Upon inspection of the google-streetview-pano.html file it is easy to see the "update" function that makes this happen. There is also a "stop" function that calls cancelAnimationFrame(this.rAFid) to stop animation.
How can I call the "stop" function from a button on the page?
Do all exposed public functions need to be listed in the attributes declaration of the google-streetview-pano.html file? If so, do I need to create a new custom element based on the parent?
Methods are on the element's prototype. You call a custom element's method just like calling a native HTML element DOM API:
<google-streetview-pano id="pano"></google-streetview-pano>
<script>
document.addEventListener('polymer-ready', function() {
document.querySelector('#pano').stop();
});
</script>
Published properties are properties on the element that are configurable via an HTML attribute of the same name. They're different than methods.