You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/03/28 20:07:00 UTC
[royale-asjs] 09/10: fix how we find the root now that
mx:Application is not the body
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 48e9ec6bbc801830c28db3c0c81ade3e7c0fe8d8
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 28 13:06:19 2018 -0700
fix how we find the root now that mx:Application is not the body
---
mustella/src/main/java/marmotinni/TestStep.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/mustella/src/main/java/marmotinni/TestStep.java b/mustella/src/main/java/marmotinni/TestStep.java
index e0c07c6..9ee9023 100644
--- a/mustella/src/main/java/marmotinni/TestStep.java
+++ b/mustella/src/main/java/marmotinni/TestStep.java
@@ -102,9 +102,13 @@ public class TestStep {
protected void insertTargetScript(StringBuilder sb, String target)
{
sb.append("var target = document.getElementsByTagName('body')[0];");
- sb.append("target = target.royale_wrapper;");
- sb.append("if (target.initialView)");
- sb.append(" target = target.initialView;");
+ sb.append("if (target.royale_wrapper) {");
+ sb.append(" target = target.royale_wrapper;");
+ sb.append(" if (target.initialView)");
+ sb.append(" target = target.initialView;}");
+ sb.append("else {");
+ sb.append(" target = document.getElementsByClassName('Application')[0];");
+ sb.append(" target = target.royale_wrapper;}");
if (target == null || target.length() == 0)
{
return;
--
To stop receiving notification emails like this one, please contact
aharui@apache.org.