This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new ead14ed  add attributes "target" and "rel" to html anchor component (A)
ead14ed is described below

commit ead14eda2d6a92e96a16bd976325ae2c9326d807
Author: Carlos Rovira <carlosrov...@apache.org>
AuthorDate: Thu Dec 27 01:13:46 2018 +0100

    add attributes "target" and "rel" to html anchor component (A)
---
 .../royale/org/apache/royale/html/elements/A.as    | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git 
a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/A.as 
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/A.as
index ae3752f..7d81c51 100644
--- 
a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/A.as
+++ 
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/A.as
@@ -72,6 +72,53 @@ package org.apache.royale.html.elements
                 element.setAttribute('href', value);
             }
                }
+        
+               private var _target:String = "_self";
+        /**
+         *  the target attribute. Defaults to "_self"
+                *  Other options "_blank", "_parent", "_top"
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.6
+         */
+               public function get target():String
+               {
+            return _target;   
+               }
+               public function set target(value:String):void
+               {
+            _target = value;
+            
+            COMPILE::JS
+            {
+                element.setAttribute('target', value);
+            }
+               }
+               
+               private var _rel:String = "";
+        /**
+         *  The rel attribute specifies the relationship between the current 
document and the linked document.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9.6
+         */
+               public function get rel():String
+               {
+            return _rel;   
+               }
+               public function set rel(value:String):void
+               {
+            _rel = value;
+            
+            COMPILE::JS
+            {
+                element.setAttribute('rel', value);
+            }
+               }
                
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement

Reply via email to