joshtynjala commented on issue #1252:
URL: https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577

   As an example, Jewel's `TabBarView` contains the following `<inject_script>` 
that links to a JS library on Cloudflare. That's not going to work anymore.
   
   ```
   <inject_script>
   var script = document.createElement("script");
   script.setAttribute("src", 
"https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js";);
   document.head.appendChild(script);
   </inject_script>
   ```
   
   We're going to need to change `TabBarView` (and any other classes in 
royale-asjs that use `<inject_script>` to load files from CDNs) to provide that 
script file in a different way. 
   
   I recently added a `-js-include-script` option to royale-compiler. That's 
probably our best bet. It includes the .js file in the .swc file (or in the 
compiled app), and it automatically adds a `<script>` tag to the .html file.
   
   In Jewel, we might use it like this (assuming that web-animations.min.js is 
added to our repo at that location):
   
   ```
   -js-include-script+=src/main/assembly/scripts/web-animations.min.js
   ```
   
   That means that we'll need to include web-animations.min.js in the Royale 
distribution. Hopefully, all of the scripts that we're referencing have 
compatible licenses that the ASF accepts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@royale.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to