Iirc, a component can have children by declaring a mxmlContent array as default property.
Get Outlook for Android<https://aka.ms/ghei36> ________________________________ From: Harbs <harbs.li...@gmail.com> Sent: Sunday, August 13, 2017 1:11:58 AM To: dev@flex.apache.org Subject: Re: FlexJS InnerHTML could work, but having the ability to use ids and the like is a big advantage. My understanding is that for MXML elements to have children, they need to subclass Group. Is that right? > On Aug 13, 2017, at 4:28 AM, Alex Harui <aha...@adobe.com.INVALID> wrote: > > I think it depends a bit on what access you need to the HTML snippet. You > should be able to use innerHTML to inject any kind of HTML in a Div. But > the ids in the HTML aren't accessible to AS code. > > So, yes, you will need to wrap every HTML component with AS to access it > from AS. > > -Alex > > On 8/12/17, 3:35 PM, "Harbs" <harbs.li...@gmail.com> wrote: > >> The goal is to make it easy to fill in with simple HTML when there is no >> ready-to-go FLexJS components. >> >> I’d like to be able to use MXML to mark up some HTML and just have the >> CSS “work”. >> >> For example, I just tried using this >> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackover >> flow.com%2Fa%2F39846603&data=02%7C01%7C%7Cf2c8ff1357ef48b1986108d4e1d274de >> %7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636381741403258756&sdata=s1L >> 66FW9vZy0CyhuPhJFT1h8D57U0hp2IwHfr%2BMAhzo%3D&reserved=0 >> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackove >> rflow.com%2Fa%2F39846603&data=02%7C01%7C%7Cf2c8ff1357ef48b1986108d4e1d274d >> e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636381741403258756&sdata=s1 >> L66FW9vZy0CyhuPhJFT1h8D57U0hp2IwHfr%2BMAhzo%3D&reserved=0> and it was >> much harder than I thought it would be. >> >> It looks like I’m going to need to create a component which wraps the >> functionality rather than just being able to use: >> >> <js:Div width="100%" height="20"> >> <js:Label className="cropswitch"> >> <js:Input type="checkbox" >> id="cropToggleButton"/> >> <js:Div className="cropslider round"/> >> </js:Label> >> </js:Div> >> >> By “full wrapper” I meant a full set of wrappers. >> >>> On Aug 13, 2017, at 1:08 AM, Alex Harui <aha...@adobe.com.INVALID> >>> wrote: >>> >>> I don't understand your goal. What is a "full wrapper"? Many Basic >>> component already wrap HTMLElements. >>> >>> I think there is another set that has the same name as the HTML >>> elements, >>> like Div, A, etc. >>> >>> -Alex >>> >>> On 8/12/17, 2:56 PM, "Harbs" <harbs.li...@gmail.com >>> <mailto:harbs.li...@gmail.com>> wrote: >>> >>>> Changing the namespace is not enough. >>>> >>>> The package path of Basic is org.apache.flex.html. Unless we change the >>>> package path of HTML to be different than Basic, classes cannot be >>>> named >>>> the same… >>>> >>>>> On Aug 13, 2017, at 12:25 AM, Harbs <harbs.li...@gmail.com> wrote: >>>>> >>>>> Namespace for HTML components. >>>>> >>>>> The list of HTML components is not complete. >>>>> >>>>> For example, Label does not exist in HTML. It only exists in Basic. >>>>> The >>>>> Label there inserts various formatting which is normally expected. >>>>> >>>>> I’d like to fill out the HTML components to be full wrappers for >>>>> simple >>>>> HTML elements but there will be collisions with the “Basic” >>>>> components. >>>>> Currently the HTML components use library://ns.apache.org/flexjs/basic >>>>> <library://ns.apache.org/flexjs/basic >>>>> <library://ns.apache.org/flexjs/basic>> as their namespace. I think it >>>>> makes sense to change that to library://ns.apache.org/flexjs/html >>>>> <library://ns.apache.org/flexjs/html> >>>>> <library://ns.apache.org/flexjs/html >>>>> <library://ns.apache.org/flexjs/html>> instead. >>>>> >>>>> Any objections to making that change? >>>>> >>>>> Harbs >> >