From 24b483db367291b72170f969de78efcb1a9b95bd Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 3 May 2012 22:53:07 -0700 Subject: integrating the latest montage version Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/anchor.reel/anchor.js | 78 ++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 12 deletions(-) (limited to 'node_modules/montage/ui/anchor.reel') diff --git a/node_modules/montage/ui/anchor.reel/anchor.js b/node_modules/montage/ui/anchor.reel/anchor.js index d8ac1d8f..2c12684b 100644 --- a/node_modules/montage/ui/anchor.reel/anchor.js +++ b/node_modules/montage/ui/anchor.reel/anchor.js @@ -3,24 +3,78 @@ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ + +/** + @module "montage/ui/anchor.reel" + @requires montage/core/core + @requires montage/ui/native-control +*/ var Montage = require("montage").Montage, Component = require("ui/component").Component, NativeControl = require("ui/native-control").NativeControl; - /** - * The native control with binding support for the standard attributes - */ + The Anchor component wraps a native <a> element and exposes its standard attributes as bindable properties. + @class module:"montage/ui/anchor.reel".Anchor + @extends module:montage/native-control.NativeControl + +*/ var Anchor = exports.Anchor = Montage.create(NativeControl, { + // HTMLAnchorElement methods + + blur: { value: function() { this._element.blur(); } }, + focus: { value: function() { this._element.focus(); } } + }); -http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element -Anchor.addAttributes({ - textContent: null, - href: null, - hreflang: null, - media: null, - rel: null, - target: null, - type: null +Anchor.addAttributes( /** @lends module:"montage/ui/anchor.reel".Anchor# */ { + +/** + The text displayed by the link. + @type string + @default null +*/ + textContent: null, + +/** + The link target URL. + @type string + @default null +*/ + href: null, + +/** + The language of the linked resource. + @type string + @default null +*/ + hreflang: null, + +/** + The media type for which the target document was designed. + @type string + @default null +*/ + media: null, + +/** + Controls what kinds of links the elements create. + @type string + @default null +*/ + rel: null, + +/** + The target window the link will open in. + @type string + @default null +*/ + target: null, + +/** + The MIME type of the linked resource. + @type string + @default null +*/ + type: null }); -- cgit v1.2.3