royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [royale-asjs] branch feature/layout-optimization updated: Use textContent instead of innerHTML
Date Tue, 27 Mar 2018 14:38:15 GMT
This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch feature/layout-optimization
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/layout-optimization by this push:
     new c14de7d  Use textContent instead of innerHTML
c14de7d is described below

commit c14de7de96120d142b1e7f5bf9068ea462678a3d
Author: Harbs <harbs@in-tools.com>
AuthorDate: Tue Mar 27 17:38:09 2018 +0300

    Use textContent instead of innerHTML
---
 .../Basic/src/main/royale/org/apache/royale/html/CloseButton.as       | 2 +-
 .../Basic/src/main/royale/org/apache/royale/html/TextButton.as        | 4 ++--
 .../org/apache/royale/html/supportClasses/StringItemRenderer.as       | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
index 27eb61b..e93fcd7 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/CloseButton.as
@@ -54,7 +54,7 @@ package org.apache.royale.html
         override protected function createElement():WrappedHTMLElement
         {
             super.createElement();
-            element.innerHTML = 'x';
+            element.textContent = 'x';
             
             element.style.padding = 0;
             height = 11;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/TextButton.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/TextButton.as
index 87c35d0..a794eda 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/TextButton.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/TextButton.as
@@ -66,7 +66,7 @@ package org.apache.royale.html
             }
             COMPILE::JS
             {
-                return element.innerHTML;
+                return element.textContent;
             }
 		}
 
@@ -81,7 +81,7 @@ package org.apache.royale.html
             }
             COMPILE::JS
             {
-                this.element.innerHTML = value;
+                this.element.textContent = value;
                 this.dispatchEvent('textChange');
             }
 		}
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/StringItemRenderer.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/StringItemRenderer.as
index f6a36c5..b49c826 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/StringItemRenderer.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/StringItemRenderer.as
@@ -115,7 +115,7 @@ package org.apache.royale.html.supportClasses
             }
             COMPILE::JS
             {
-                return this.element.innerHTML;
+                return this.element.textContent;
             }
 		}
 
@@ -127,7 +127,7 @@ package org.apache.royale.html.supportClasses
             }
             COMPILE::JS
             {
-                this.element.innerHTML = value;
+                this.element.textContent = value;
             }
 		}
 

-- 
To stop receiving notification emails like this one, please contact
harbs@apache.org.

Mime
View raw message