summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/settings/internet_page/network_proxy_exclusions.js
blob: b765e1d8218db1eb3218a2358a67fdd47642fba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @fileoverview Polymer element for displaying a list of proxy exclusions.
 * Includes UI for adding, changing, and removing entries.
 */

(function() {

Polymer({
  is: 'network-proxy-exclusions',

  properties: {
    /**
     * The list of exclusions.
     * @type {!Array<string>}
     */
    exclusions: {
      type: Array,
      value: function() { return []; },
      notify: true
    }
  },

  /**
   * Event triggered when an item is removed.
   * @param {!{model: !{index: number}}} event
   * @private
   */
  removeItem_: function(event) {
    var index = event.model.index;
    this.splice('exclusions', index, 1);
    this.fire('proxy-change');
  }
});
})();