flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: [FlexJS] Accessing the DOM
Date Thu, 23 Mar 2017 21:05:01 GMT
The typedef of HTMLInputElement comes from the js.swc. You can also use “Object”.

Yes. You can use “regular” JS in any project as long as you include the js.swc s an external
library. However, you cannot compile to SWF if you do so.

I’m using VS Code and Josh’s asconfig, with this asconfig.json file to output JS:

{
    "config": "flex",
    "compilerOptions": {
        "debug": false,
        "js-output-type": "flexjs",
        "source-map": true,
        "library-path": [
            "lib"
        ],
        "external-library-path": [
        "typedefs"
        ]
    },
    
    "additionalOptions": "-remove-circulars -js-output-optimization=skipAsCoercions",
    "files":
    [
        "src/MyApp.mxml"
    ]
}


HTH,
Harbs

> On Mar 23, 2017, at 10:46 PM, OK <post@olafkrueger.net> wrote:
> 
> Hi,
> FlexJS and Falcon are still some kinds of a black box for me, maybe somebody
> could enlighten me again:
> 
> Encouraged again by Josh's tutorials I'm playing around with accessing the
> DOM by using e.g. 
> "document.getElementById('myInput') as HTMLInputElement" which works pretty
> fine.
> My understanding is that this is an AS3 feature and that "js.swc" contains
> all the type definitions that make this possible.
> 
> To get an idea of how it works I've searched the falcon (and also asjs) repo
> with keywords like "HTMLInputElement" but I found nothing relevant.
> 
> Moreover, it seems to me that accessing the DOM only works with pure AS3
> projects?
> Or it is possible to build "native AS3/HTML components" and compile it at
> the same time with FlexJS components within the same project?
> 
> Thanks,
> Olaf
> 
> 
> 
> 
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Accessing-the-DOM-tp60722.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message