UNPKG

ares-ide

Version:

A browser-based code editor and UI designer for Enyo 2 projects

34 lines (33 loc) 802 B
/** _enyo.Anchor_ implements an HTML anchor (<a>) tag. Published properties allow you to bind the anchor's _href_ and _title_ attributes to appropriate fields on data objects. */ enyo.kind({ name: "enyo.Anchor", kind: "enyo.Control", tag: "a", //* @public published: { //* Maps to the _href_ attribute of the <a> tag href: "", //* Maps to the _title_ attribute of the <a> tag title: "" }, //* @protected create: enyo.inherit(function (sup) { return function() { sup.apply(this, arguments); this.hrefChanged(); this.titleChanged(); }; }), //* @protected hrefChanged: function() { this.setAttribute("href", this.href); }, //* @protected titleChanged: function() { this.setAttribute("title", this.title); } });