2 Copyright 2014 The Chromium Authors. All rights reserved.
3 Use of this source code is governed by a BSD-style license that can be
4 found in the LICENSE file.
7 <polymer-element name="ct-tree-select" attributes="tree treeList">
9 <select id='treeSelect' on-change="{{ _updateTree }}" value="{{ tree }}">
10 <template repeat="{{ s in treeList.trees }}">
11 <option value="{{ s.name }}">{{ s.displayName }}</option>
24 _updateTree: function(event) {
25 this.asyncFire('navigate', {
26 url: event.target.value
30 treeChanged: function() {
31 if (!this.tree.length)
34 // Enforce the tree list, so we don't show a blank select value.
35 var option = this.$.treeSelect.querySelector('option[value="' + this.tree + '"]');
37 // URL is incorrect. Replace with the root so we use the default tree.
38 this.asyncFire('navigate', {