1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * 'cr-settings-menu' shows a menu with a hardcoded set of pages and subpages.
11 * <cr-settings-menu selected-page-id="{{selectedPageId}}">
14 * @group Chrome Settings Elements
15 * @element cr-settings-menu
18 is: 'cr-settings-menu',
22 * The current active route.
27 observer: 'currentRouteChanged_',
32 currentRouteChanged_: function() {
33 var submenu = this.shadowRoot.querySelector(
34 'paper-submenu[data-page="' + this.currentRoute.page + '"]');
36 submenu.opened = true;
40 openPage_: function(event) {
41 var submenuRoute = event.currentTarget.dataset.page;