3 Polymer('core-submenu', {
6 active
: {value
: false, reflect
: true}
12 return this.$.submenu
.items
;
15 hasItems: function() {
16 return !!this.items
.length
;
19 unselectAllItems: function() {
20 this.$.submenu
.selected
= null;
21 this.$.submenu
.clearSelection();
24 activeChanged: function() {
25 if (this.hasItems()) {
26 this.opened
= this.active
;
29 this.unselectAllItems();
34 this.opened
= !this.opened
;
37 activate: function() {
38 if (this.hasItems() && this.active
) {
40 this.unselectAllItems();