bb2d8d3e2400fde4d7308ad7fb0554a31567ed73
[blerg.git] / www / jssrc / blerg / Link.js
1 enyo.kind({
2         name: "blerg.Link",
3         kind: "Control",
4         tag: "a",
5         href: "#",
6         handlers: {
7                 onclick: "muteLink",
8         },
9         create: function() {
10                 this.inherited(arguments);
11                 this.setAttribute('href', this.href);
12         },
13         muteLink: function(inSender, inEvent) {
14                 inEvent.preventDefault();
15                 if (this.href != '#')
16                         location.href = this.href;
17                 this.bubble('onNavigate');
18                 return true;
19         }
20 });