Blame view

bower_components/polymer-element-catalog/app/elements/app-link/app-link.html 391 Bytes
07d13c9c   isisadmin   polymer catalog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  <script>
  Polymer({
    is: 'app-link',
    extends: 'a',
    properties: {
      skipNav: Boolean
    },
    listeners: {
      'click': 'navigate'
    },
    navigate: function(e) {
      // allow for ctrl+click to open in new window
      if (e.ctrlKey || e.metaKey) {
        return true;
      } else {
        e.preventDefault();
        if (!this.skipNav) this.fire('nav', {url: this.href});
      }
    }
  });
  </script>