apache/royale-asjs

inject_html does not work in modules

Open

#427 opened on Jun 16, 2019

View on GitHub
 (5 comments) (0 reactions) (0 assignees)ActionScript (381 stars) (120 forks)batch import
help wanted

Description

Hi,

putting the pieces together for the next blog example about modules I found "inject_html" does not work for modules. If you think about it is normal, since inject adds to the html template, so if the class with the inject is in a module, the app does not know about it.

Only if we improve modules with the capability to write the inject lines in the html template this could be fixed.

Don't know how hard this could be.

In the BE0013 example I want to use Material Icons that use inject_htnk to add the Material Icons line to the html and make the icons available to the app. To work around the problem I put a import in the App:

import MaterialIconType; MaterialIconType;

This means as well add the library dependency in the Application instead of the module, defeating a bit the module purpose.

In this way the inject line is in the final html and when I use a font icon in a module I get the proper icon.

Can we solve this in some way?

Contributor guide