You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/01/31 21:18:29 UTC

[royale-asjs] branch develop updated: Avoid error in IE11 with CSSStyleSheet.insertRule non-optional second parameter

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

gregdove 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 5be3213  Avoid error in IE11 with CSSStyleSheet.insertRule non-optional second parameter
5be3213 is described below

commit 5be321305c0281cefa1f576af443b528133502a3
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Feb 1 10:18:07 2020 +1300

    Avoid error in IE11 with CSSStyleSheet.insertRule non-optional second parameter
---
 .../main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
index 1fefe53..3f36ff1 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/CheckBoxView.as
@@ -183,12 +183,13 @@ package org.apache.royale.jewel.beads.views
 		{
 			COMPILE::JS
 			{
-				var selectorString:String = selector + ' { ' + rule + ' }'
+				var selectorString:String = selector + ' { ' + rule + ' }';
 				var element:HTMLStyleElement = document.getElementById("royale_dynamic_css") as HTMLStyleElement;
 				if(element)
 				{
 					var sheet:CSSStyleSheet = element.sheet as CSSStyleSheet;
-					sheet.insertRule(selectorString);
+					//for 'insertRule' below, the index (2nd) argument is not optional in IE11, but is optional for modern browsers (with default value 0)
+					sheet.insertRule(selectorString, 0);
 				}
 				else
 				{