//parent
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<link rel="import" href="test-element.html">
<dom-module id="my-element">
<template>
<test-element id="test"></test-element>
</template>
<script>
class MyElement extends Polymer.Element{
static get is () { return "my-element"; }
connectedCallback(){
super.connectedCallback();
this.$.test.alert();
}
}
customElements.define( MyElement.is, MyElement);
</script>
</dom-module>
<my-element></my-element>
//child
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<dom-module id="test-element">
<script>
class TestElement extends Polymer.Element{
static get is () { return "test-element"; }
alert(){
alert('TEST');
}
}
customElements.define( TestElement.is, TestElement);
</script>
</dom-module>