You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/10/25 01:32:07 UTC
[GitHub] aharui commented on issue #325: Adding support for ExternalInterface
aharui commented on issue #325: Adding support for ExternalInterface
URL: https://github.com/apache/royale-asjs/pull/325#issuecomment-432882575
Interesting idea. I was expecting it to be in the MXRoyale SWC in mx/core.
Putting it in Core.swc implies it is a pattern we want people to use in new projects, not just projects migrating from Flex. While it would work, I wonder if we should be promoting some other, more tightly integrated pattern like typedefs/externs so you can maintain strong-typing when calling external code.
ExternalInterface loses the type-safety. It returns * and you have to cast/coerce the results. If you instead just create the AS API for your JS functions and add @externs to the ASDoc, the compiler should transpile the AS to JS but treat it as a typedef so it won't actually put the transpiled code in the output.
What do others think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services