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

________________________________
From: Carlos Rovira <carlosrov...@apache.org>
Sent: Saturday, May 16, 2020 12:50:43 PM
To: users@royale.apache.org <users@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 
(<yishayj...@hotmail.com<mailto:yishayj...@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

Reply via email to