You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/05/03 21:37:42 UTC

[royale-asjs] branch develop updated: jewel: add dialogPolyfill as a @extern instead to access it via windows object with brackets notation

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 468bbba  jewel: add dialogPolyfill as a @extern instead to access it via windows object with brackets notation
468bbba is described below

commit 468bbbaa4bff8da29a82bc7b92766cf4d68a33d8
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Fri May 3 23:37:35 2019 +0200

    jewel: add dialogPolyfill as a @extern instead to access it via windows object with brackets notation
---
 .../Jewel/src/main/royale/dialogPolyfill.as        | 28 ++++++++++++++++++++++
 .../main/royale/org/apache/royale/jewel/Alert.as   |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/dialogPolyfill.as b/frameworks/projects/Jewel/src/main/royale/dialogPolyfill.as
new file mode 100644
index 0000000..3c7ef77
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/dialogPolyfill.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+	/**
+	 * @externs
+	 */
+	public class dialogPolyfill
+	{
+		public static function registerDialog(dialog:HTMLDialogElement):void {}
+	}
+}
\ No newline at end of file
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Alert.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Alert.as
index fe363db..f257458 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Alert.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Alert.as
@@ -222,7 +222,7 @@ package org.apache.royale.jewel
 					
 					if (!("showModal" in dialog))
 					{
-						window["dialogPolyfill"]["registerDialog"](dialog);
+						dialogPolyfill.registerDialog(dialog);
 					}
 
 					//avoid scroll in html