apache / apache/royale-asjs

inject_html does not work in modules

Open
#427 5 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

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

No contributing guide indexed for this repository

Research direction

Start with the BE0013 example and the App/Application workaround, then trace how inject_html is handled when the class belongs to a module. Compare the generated final HTML with and without the import. Done means a module dependency can place its inject line in the final HTML without requiring an explicit application import.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.