You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Yishay Weiss <yi...@hotmail.com> on 2020/05/15 15:26:07 UTC

Heads Up: was replaced with

Hi,

A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.

For example,


         * <inject_html>
         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css">
         * </inject_html>

Should be converted to be

         * <inject_script>
         * var script = document.createElement("script");
         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");
                                * document.head.appendChild(script);
         * var link = document.createElement("link");
         * link.setAttribute("rel", "stylesheet");
         * link.setAttribute("type", "text/css");
         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");
         * document.head.appendChild(link);
         * </inject_script>

Thanks,
Yishay

[1] https://github.com/apache/royale-asjs/issues/826


Re: Heads Up: was replaced with

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,

In TDJ I have involved:

1) dialogPolyfill at Jewel library level
2) hljs at TDJ level

only the dialogPolyfill is generating a RTE in release mode. I think far
beyond strategies on how to load it, we should fix that race issue for
release mode since is a bug introduced, right?

About load strategies, I think it deserves other thread, since I was
thinking about it (even considering some proposals from Alex about it), but
prefer don't write about it here to avoid confusion about the RTE issue in
release mode.

Thanks


El sáb., 16 may. 2020 a las 13:53, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> One last note to make it clear, if you use static initializers like that
> you don’t need <inject_script> at all.
>
>
>
> *From: *Yishay Weiss <yi...@hotmail.com>
> *Sent: *Saturday, May 16, 2020 2:47 PM
> *To: *users@royale.apache.org
> *Subject: *RE: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Should be getJs():String{} and getCss():String{}
>
>
>
> *From: *Yishay Weiss <yi...@hotmail.com>
> *Sent: *Saturday, May 16, 2020 2:42 PM
> *To: *users@royale.apache.org
> *Subject: *RE: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> To avoid errors in the console and have more control over this in your
> app, you can probably use static initializers. For example (not tested),
>
>
>
> package A
>
> {
>
>                 import org.apache.royale.utils.css.loadCSS;
>
>                 import org.apache.royale.utils.js.loadJavascript;
>
>                 public class B
>
>                 {
>
>                                 private static var jsId:String = getJs();
>
>                                 private static var cssId:String = getCss();
>
>                                 private static var jsLoaded:Boolean;
>
>                                 private static var cssLoaded:Boolean;
>
>
>
>                                 private static function getJs():Boolean
>
>                                 {
>
>                                                 return loadJavascript(“
> http://myLib.js”, raiseJsLoadedFlag);
>
>                                 }
>
>
>
>                                 private static function getCss():Boolean
>
>                                 {
>
>                                                 return loadCSS("
> http://myLib.css”, raiseCssLoadedFlag);
>
>                                 }
>
>
>
>                                 private static function
> raiseJsLoadedFlag():void
>
>                                 {
>
>                                                 jsLoaded = true;
>
>                                 }
>
>
>
>                                 private static function
> raiseCssLoadedFlag():void
>
>                                 {
>
>                                                 cssLoaded = true;
>
>                                 }
>
>
>
>                                 public function doLibStuff():void
>
>                                 {
>
>                                                 if (jsLoaded && cssLoaded)
>
>                                                 {
>
>                                                                 // call
> lib api
>
>                                                 } else
>
>                                                 {
>
>                                                                 // warn
> user lib hasn't been loaded yet
>
>                                                 }
>
>                                 }
>
>                 }
>
> }
>
>
>
> This also allows for a conditional load based on BrowserInfo.
>
>
>
> *From: *Yishay Weiss <yi...@hotmail.com>
> *Sent: *Saturday, May 16, 2020 2:04 PM
> *To: *users@royale.apache.org
> *Subject: *RE: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Ok, I’m seeing it now. It looks like there’s a race condition that only
> manifests in release mode because the app initializes quicker. The good
> news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually
> load in release as well, so I don’t think there will be functional
> implications unless your code calls these objects on initialization.
>
>
>
>
>
> *From:* Carlos Rovira <ca...@apache.org>
> *Sent:* Saturday, May 16, 2020 1:18:20 PM
> *To:* users@royale.apache.org <us...@royale.apache.org>
> *Subject:* Re: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Hi, I think the problems is only in release not in debug mode
>
>
>
> El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Hi Yishay,
>
> yes I build all days before starting
>
>
>
>
>
> El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> Are you sure you updated both the compiler and asjs? I did test Alert.
>
>
>
> *From:* Carlos Rovira <ca...@apache.org>
> *Sent:* Saturday, May 16, 2020 12:50:43 PM
> *To:* users@royale.apache.org <us...@royale.apache.org>
> *Subject:* Re: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Hi Yishay,
>
>
>
> I'm seeing in TDJ this error when running:
>
>
>
> ReferenceError: dialogPolyfill is not defined
>     at
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1
>
>
>
> Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?
>
>
>
> How can that error be removed?
>
>
>
>
>
>
>
> El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> Hi,
>
>
>
> A heads-up in case your application uses <inject_html>. Due to a bug [1]
> that was found when loading modules on IE <inject_html> was deprecated in
> favor of <inject_script>. So if you’ve used <inject_html> to add html
> elements to your application, please convert it to add js instead.
>
>
>
> For example,
>
>
>
>
>
>          * <inject_html>
>
>          * <script src="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> "></script>
>
>          * <link rel="stylesheet" href="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ">
>
>          * </inject_html>
>
>
>
> Should be converted to be
>
>
>
>          * <inject_script>
>
>          * var script = document.createElement("script");
>
>          * script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> ");
>
>                                 * document.head.appendChild(script);
>
>          * var link = document.createElement("link");
>
>          * link.setAttribute("rel", "stylesheet");
>
>          * link.setAttribute("type", "text/css");
>
>          * link.setAttribute("href", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ");
>
>          * document.head.appendChild(link);
>
>          * </inject_script>
>
>
>
> Thanks,
>
> Yishay
>
>
>
> [1] https://github.com/apache/royale-asjs/issues/826
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Sent: *Saturday, May 16, 2020 1:18 PM
> *To: *users@royale.apache.org
> *Subject: *Re: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Hi, I think the problems is only in release not in debug mode
>
>
>
> El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Hi Yishay,
>
> yes I build all days before starting
>
>
>
>
>
> El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> Are you sure you updated both the compiler and asjs? I did test Alert.
>
>
>
> *From:* Carlos Rovira <ca...@apache.org>
> *Sent:* Saturday, May 16, 2020 12:50:43 PM
> *To:* users@royale.apache.org <us...@royale.apache.org>
> *Subject:* Re: Heads Up: <inject_html> was replaced with <inject_script>
>
>
>
> Hi Yishay,
>
>
>
> I'm seeing in TDJ this error when running:
>
>
>
> ReferenceError: dialogPolyfill is not defined
>     at
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1
>
>
>
> Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?
>
>
>
> How can that error be removed?
>
>
>
>
>
>
>
> El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> Hi,
>
>
>
> A heads-up in case your application uses <inject_html>. Due to a bug [1]
> that was found when loading modules on IE <inject_html> was deprecated in
> favor of <inject_script>. So if you’ve used <inject_html> to add html
> elements to your application, please convert it to add js instead.
>
>
>
> For example,
>
>
>
>
>
>          * <inject_html>
>
>          * <script src="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> "></script>
>
>          * <link rel="stylesheet" href="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ">
>
>          * </inject_html>
>
>
>
> Should be converted to be
>
>
>
>          * <inject_script>
>
>          * var script = document.createElement("script");
>
>          * script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> ");
>
>                                 * document.head.appendChild(script);
>
>          * var link = document.createElement("link");
>
>          * link.setAttribute("rel", "stylesheet");
>
>          * link.setAttribute("type", "text/css");
>
>          * link.setAttribute("href", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ");
>
>          * document.head.appendChild(link);
>
>          * </inject_script>
>
>
>
> Thanks,
>
> Yishay
>
>
>
> [1] https://github.com/apache/royale-asjs/issues/826
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
>
>
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

RE: Heads Up: was replaced with

Posted by Yishay Weiss <yi...@hotmail.com>.
One last note to make it clear, if you use static initializers like that you don’t need <inject_script> at all.

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:47 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

Should be getJs():String{} and getCss():String{}

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:42 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

To avoid errors in the console and have more control over this in your app, you can probably use static initializers. For example (not tested),

package A
{
                import org.apache.royale.utils.css.loadCSS;
                import org.apache.royale.utils.js.loadJavascript;
                public class B
                {
                                private static var jsId:String = getJs();
                                private static var cssId:String = getCss();
                                private static var jsLoaded:Boolean;
                                private static var cssLoaded:Boolean;

                                private static function getJs():Boolean
                                {
                                                return loadJavascript(“http://myLib.js”, raiseJsLoadedFlag);
                                }

                                private static function getCss():Boolean
                                {
                                                return loadCSS("http://myLib.css”, raiseCssLoadedFlag);
                                }

                                private static function raiseJsLoadedFlag():void
                                {
                                                jsLoaded = true;
                                }

                                private static function raiseCssLoadedFlag():void
                                {
                                                cssLoaded = true;
                                }

                                public function doLibStuff():void
                                {
                                                if (jsLoaded && cssLoaded)
                                                {
                                                                // call lib api
                                                } else
                                                {
                                                                // warn user lib hasn't been loaded yet
                                                }
                                }
                }
}

This also allows for a conditional load based on BrowserInfo.

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:04 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

Ok, I’m seeing it now. It looks like there’s a race condition that only manifests in release mode because the app initializes quicker. The good news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually load in release as well, so I don’t think there will be functional implications unless your code calls these objects on initialization.



From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 1:18:20 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Are you sure you updated both the compiler and asjs? I did test Alert.



From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira

From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, May 16, 2020 1:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:
Are you sure you updated both the compiler and asjs? I did test Alert.


From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira






RE: Heads Up: was replaced with

Posted by Yishay Weiss <yi...@hotmail.com>.
Should be getJs():String{} and getCss():String{}

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:42 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

To avoid errors in the console and have more control over this in your app, you can probably use static initializers. For example (not tested),

package A
{
                import org.apache.royale.utils.css.loadCSS;
                import org.apache.royale.utils.js.loadJavascript;
                public class B
                {
                                private static var jsId:String = getJs();
                                private static var cssId:String = getCss();
                                private static var jsLoaded:Boolean;
                                private static var cssLoaded:Boolean;

                                private static function getJs():Boolean
                                {
                                                return loadJavascript(“http://myLib.js”, raiseJsLoadedFlag);
                                }

                                private static function getCss():Boolean
                                {
                                                return loadCSS("http://myLib.css”, raiseCssLoadedFlag);
                                }

                                private static function raiseJsLoadedFlag():void
                                {
                                                jsLoaded = true;
                                }

                                private static function raiseCssLoadedFlag():void
                                {
                                                cssLoaded = true;
                                }

                                public function doLibStuff():void
                                {
                                                if (jsLoaded && cssLoaded)
                                                {
                                                                // call lib api
                                                } else
                                                {
                                                                // warn user lib hasn't been loaded yet
                                                }
                                }
                }
}

This also allows for a conditional load based on BrowserInfo.

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:04 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

Ok, I’m seeing it now. It looks like there’s a race condition that only manifests in release mode because the app initializes quicker. The good news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually load in release as well, so I don’t think there will be functional implications unless your code calls these objects on initialization.



From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 1:18:20 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Are you sure you updated both the compiler and asjs? I did test Alert.



From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira

From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, May 16, 2020 1:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:
Are you sure you updated both the compiler and asjs? I did test Alert.


From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira





RE: Heads Up: was replaced with

Posted by Yishay Weiss <yi...@hotmail.com>.
To avoid errors in the console and have more control over this in your app, you can probably use static initializers. For example (not tested),

package A
{
                import org.apache.royale.utils.css.loadCSS;
                import org.apache.royale.utils.js.loadJavascript;
                public class B
                {
                                private static var jsId:String = getJs();
                                private static var cssId:String = getCss();
                                private static var jsLoaded:Boolean;
                                private static var cssLoaded:Boolean;

                                private static function getJs():Boolean
                                {
                                                return loadJavascript(“http://myLib.js”, raiseJsLoadedFlag);
                                }

                                private static function getCss():Boolean
                                {
                                                return loadCSS("http://myLib.css”, raiseCssLoadedFlag);
                                }

                                private static function raiseJsLoadedFlag():void
                                {
                                                jsLoaded = true;
                                }

                                private static function raiseCssLoadedFlag():void
                                {
                                                cssLoaded = true;
                                }

                                public function doLibStuff():void
                                {
                                                if (jsLoaded && cssLoaded)
                                                {
                                                                // call lib api
                                                } else
                                                {
                                                                // warn user lib hasn't been loaded yet
                                                }
                                }
                }
}

This also allows for a conditional load based on BrowserInfo.

From: Yishay Weiss<ma...@hotmail.com>
Sent: Saturday, May 16, 2020 2:04 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

Ok, I’m seeing it now. It looks like there’s a race condition that only manifests in release mode because the app initializes quicker. The good news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually load in release as well, so I don’t think there will be functional implications unless your code calls these objects on initialization.



From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 1:18:20 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Are you sure you updated both the compiler and asjs? I did test Alert.



From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira

From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, May 16, 2020 1:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:
Are you sure you updated both the compiler and asjs? I did test Alert.


From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira




Re: Heads Up: was replaced with

Posted by Alex Harui <ah...@adobe.com>.
Is the script tag from inject_script going before or after the script tag for the application (should be before, IMO)?  Make sure the script tag has the same settings as the script tags google closure uses in js-debug.  I think they set some options so the scripts load in order.

HTH,
-Alex

From: Yishay Weiss <yi...@hotmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Saturday, May 16, 2020 at 4:04 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: RE: Heads Up: <inject_html> was replaced with <inject_script>

Ok, I’m seeing it now. It looks like there’s a race condition that only manifests in release mode because the app initializes quicker. The good news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually load in release as well, so I don’t think there will be functional implications unless your code calls these objects on initialization.



From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 1:18:20 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Are you sure you updated both the compiler and asjs? I did test Alert.



From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fhighlight.min.js&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931524311&sdata=4oJtWlvofiSGRfL6PdSRIM0W1LXvw7cTkcAeGG9wtHk%3D&reserved=0>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fstyles%2Fatom-one-dark.min.css&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931524311&sdata=w8QgoDUv6T24ArvCRtFQg9rx15Nq6fK54fhzOxeNcOg%3D&reserved=0>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fhighlight.min.js&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931534302&sdata=KUZwZ9wr%2Bd0EYkgVdoHBvB2LjdUrr5UdbGCg3J1Ex%2BQ%3D&reserved=0>");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fstyles%2Fatom-one-dark.min.css&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931534302&sdata=ycHzm%2FuvgaW2U4sRnP2Q82ggvX0B7U14k64M9Mwr2tc%3D&reserved=0>");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F826&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931544300&sdata=NbnYL4RyMAdx5kbxLSce32V76A5O0gu2hIrBorVYTmQ%3D&reserved=0>




--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931544300&sdata=MR%2FeS%2F3fbQfjnQvN9Pk2cGC41IRhmEEv0J2iYpwjVdU%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931554290&sdata=TvwrmbjVfy6MiBZnTHwcy7AV9B2UBNhZ2pDwcCE1odw%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931554290&sdata=TvwrmbjVfy6MiBZnTHwcy7AV9B2UBNhZ2pDwcCE1odw%3D&reserved=0>

From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, May 16, 2020 1:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:
Are you sure you updated both the compiler and asjs? I did test Alert.


From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fhighlight.min.js&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931554290&sdata=pEwzBQ2N2j%2BOpi%2FORDklZCD0FcZD8F1vJ%2FDIAcWdiNg%3D&reserved=0>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fstyles%2Fatom-one-dark.min.css&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931564284&sdata=2zv9Zgxdj8i1ANMOpKz0gHAcMJ5A%2B6ErSgFpC5Pquv8%3D&reserved=0>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fhighlight.min.js&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931564284&sdata=2hKNkP9egsiDWMLS04ldot66q3y9Xobd1jdXmKJpDKE%3D&reserved=0>");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fhighlight.js%2F9.12.0%2Fstyles%2Fatom-one-dark.min.css&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931574278&sdata=An4wunbyV0vmXFKw6HnrqsN2DGTi8MilGBMheIq2ees%3D&reserved=0>");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F826&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931574278&sdata=EqxhmTSJNeq9puqZlXvH6r2pzLaao7ipUZ5xlMJddpo%3D&reserved=0>




--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931574278&sdata=FEew7nhh68%2Fzvjwaj9GFazSOSfiBcDiOyKvRWUy8KUw%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931584274&sdata=DaKV%2F5f3tg28qgKuZh4bKMCVTbCkxtBmvOKMGA9hZdQ%3D&reserved=0>



--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C47e5b05dd4e34f4b753508d7f988f4a8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637252238931584274&sdata=DaKV%2F5f3tg28qgKuZh4bKMCVTbCkxtBmvOKMGA9hZdQ%3D&reserved=0>



RE: Heads Up: was replaced with

Posted by Yishay Weiss <yi...@hotmail.com>.
Ok, I’m seeing it now. It looks like there’s a race condition that only manifests in release mode because the app initializes quicker. The good news is that window[“dialogPolyfill”], window[“hljs”], etc. do eventually load in release as well, so I don’t think there will be functional implications unless your code calls these objects on initialization.



From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 1:18:20 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Are you sure you updated both the compiler and asjs? I did test Alert.



From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira

From: Carlos Rovira<ma...@apache.org>
Sent: Saturday, May 16, 2020 1:18 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>>) escribió:
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>>) escribió:
Are you sure you updated both the compiler and asjs? I did test Alert.


From: Carlos Rovira <ca...@apache.org>>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org<ma...@royale.apache.org> <us...@royale.apache.org>>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira



Re: Heads Up: was replaced with

Posted by Carlos Rovira <ca...@apache.org>.
Hi, I think the problems is only in release not in debug mode

El sáb., 16 may. 2020 a las 12:17, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Yishay,
> yes I build all days before starting
>
>
> El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
>> Are you sure you updated both the compiler and asjs? I did test Alert.
>>
>>
>> ------------------------------
>> *From:* Carlos Rovira <ca...@apache.org>
>> *Sent:* Saturday, May 16, 2020 12:50:43 PM
>> *To:* users@royale.apache.org <us...@royale.apache.org>
>> *Subject:* Re: Heads Up: <inject_html> was replaced with <inject_script>
>>
>> Hi Yishay,
>>
>> I'm seeing in TDJ this error when running:
>>
>> ReferenceError: dialogPolyfill is not defined
>>     at
>> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1
>>
>> Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?
>>
>> How can that error be removed?
>>
>>
>>
>> El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>)
>> escribió:
>>
>> Hi,
>>
>>
>>
>> A heads-up in case your application uses <inject_html>. Due to a bug [1]
>> that was found when loading modules on IE <inject_html> was deprecated in
>> favor of <inject_script>. So if you’ve used <inject_html> to add html
>> elements to your application, please convert it to add js instead.
>>
>>
>>
>> For example,
>>
>>
>>
>>
>>
>>          * <inject_html>
>>
>>          * <script src="//
>> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
>> "></script>
>>
>>          * <link rel="stylesheet" href="//
>> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
>> ">
>>
>>          * </inject_html>
>>
>>
>>
>> Should be converted to be
>>
>>
>>
>>          * <inject_script>
>>
>>          * var script = document.createElement("script");
>>
>>          * script.setAttribute("src", "
>> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
>> ");
>>
>>                                 * document.head.appendChild(script);
>>
>>          * var link = document.createElement("link");
>>
>>          * link.setAttribute("rel", "stylesheet");
>>
>>          * link.setAttribute("type", "text/css");
>>
>>          * link.setAttribute("href", "
>> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
>> ");
>>
>>          * document.head.appendChild(link);
>>
>>          * </inject_script>
>>
>>
>>
>> Thanks,
>>
>> Yishay
>>
>>
>>
>> [1] https://github.com/apache/royale-asjs/issues/826
>>
>>
>>
>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Heads Up: was replaced with

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,
yes I build all days before starting


El sáb., 16 may. 2020 a las 11:54, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> Are you sure you updated both the compiler and asjs? I did test Alert.
>
>
> ------------------------------
> *From:* Carlos Rovira <ca...@apache.org>
> *Sent:* Saturday, May 16, 2020 12:50:43 PM
> *To:* users@royale.apache.org <us...@royale.apache.org>
> *Subject:* Re: Heads Up: <inject_html> was replaced with <inject_script>
>
> Hi Yishay,
>
> I'm seeing in TDJ this error when running:
>
> ReferenceError: dialogPolyfill is not defined
>     at
> /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1
>
> Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?
>
> How can that error be removed?
>
>
>
> El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>)
> escribió:
>
> Hi,
>
>
>
> A heads-up in case your application uses <inject_html>. Due to a bug [1]
> that was found when loading modules on IE <inject_html> was deprecated in
> favor of <inject_script>. So if you’ve used <inject_html> to add html
> elements to your application, please convert it to add js instead.
>
>
>
> For example,
>
>
>
>
>
>          * <inject_html>
>
>          * <script src="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> "></script>
>
>          * <link rel="stylesheet" href="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ">
>
>          * </inject_html>
>
>
>
> Should be converted to be
>
>
>
>          * <inject_script>
>
>          * var script = document.createElement("script");
>
>          * script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> ");
>
>                                 * document.head.appendChild(script);
>
>          * var link = document.createElement("link");
>
>          * link.setAttribute("rel", "stylesheet");
>
>          * link.setAttribute("type", "text/css");
>
>          * link.setAttribute("href", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ");
>
>          * document.head.appendChild(link);
>
>          * </inject_script>
>
>
>
> Thanks,
>
> Yishay
>
>
>
> [1] https://github.com/apache/royale-asjs/issues/826
>
>
>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

RE: Heads Up: was replaced with

Posted by Yishay Weiss <yi...@hotmail.com>.
Are you sure you updated both the compiler and asjs? I did test Alert.

________________________________
From: Carlos Rovira <ca...@apache.org>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org <us...@royale.apache.org>
Subject: Re: Heads Up: <inject_html> was replaced with <inject_script>

Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>>) escribió:

Hi,



A heads-up in case your application uses <inject_html>. Due to a bug [1] that was found when loading modules on IE <inject_html> was deprecated in favor of <inject_script>. So if you’ve used <inject_html> to add html elements to your application, please convert it to add js instead.



For example,





         * <inject_html>

         * <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js>"></script>

         * <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css<http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css>">

         * </inject_html>



Should be converted to be



         * <inject_script>

         * var script = document.createElement("script");

         * script.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js");

                                * document.head.appendChild(script);

         * var link = document.createElement("link");

         * link.setAttribute("rel", "stylesheet");

         * link.setAttribute("type", "text/css");

         * link.setAttribute("href", "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css");

         * document.head.appendChild(link);

         * </inject_script>



Thanks,

Yishay



[1] https://github.com/apache/royale-asjs/issues/826




--
Carlos Rovira
http://about.me/carlosrovira


Re: Heads Up: was replaced with

Posted by Carlos Rovira <ca...@apache.org>.
Hi Yishay,

I'm seeing in TDJ this error when running:

ReferenceError: dialogPolyfill is not defined
    at
/Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/jewel/TourDeJewel/target/javascript/bin/js-debug/App.js:10:1

Although Alert seems to work. Maybe dialogPolyfill is not needed anymore?

How can that error be removed?



El vie., 15 may. 2020 a las 17:26, Yishay Weiss (<yi...@hotmail.com>)
escribió:

> Hi,
>
>
>
> A heads-up in case your application uses <inject_html>. Due to a bug [1]
> that was found when loading modules on IE <inject_html> was deprecated in
> favor of <inject_script>. So if you’ve used <inject_html> to add html
> elements to your application, please convert it to add js instead.
>
>
>
> For example,
>
>
>
>
>
>          * <inject_html>
>
>          * <script src="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> "></script>
>
>          * <link rel="stylesheet" href="//
> cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ">
>
>          * </inject_html>
>
>
>
> Should be converted to be
>
>
>
>          * <inject_script>
>
>          * var script = document.createElement("script");
>
>          * script.setAttribute("src", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
> ");
>
>                                 * document.head.appendChild(script);
>
>          * var link = document.createElement("link");
>
>          * link.setAttribute("rel", "stylesheet");
>
>          * link.setAttribute("type", "text/css");
>
>          * link.setAttribute("href", "
> https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
> ");
>
>          * document.head.appendChild(link);
>
>          * </inject_script>
>
>
>
> Thanks,
>
> Yishay
>
>
>
> [1] https://github.com/apache/royale-asjs/issues/826
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira