Parent should be unavailable at createElement time.  There is no guarantee
when a component will be added to the DOM.  It could be instantiated and
have its properties set before being given a parent.

Why do you need to know so early?  And what code would set the parent so
early?

-Alex

On 11/29/16, 1:02 PM, "[email protected] on behalf of Carlos Rovira"
<[email protected] on behalf of [email protected]> wrote:

>In UIHTMLElementWrapper:
>
>public function get parent():IParent
>        {
>            COMPILE::JS
>            {
>            var p:WrappedHTMLElement = this.positioner.parentNode as
>WrappedHTMLElement;
>            }
>
>
>this.positioner is undefined, so I think that's a bug right?
>
>
>2016-11-29 20:37 GMT+01:00 Carlos Rovira <[email protected]>:
>
>> Hi,
>>
>> I'm trying to see what component is the parent of the current component
>>in
>> createElement mehtod of a ContainerBase
>>
>> What's the wat to check this?
>>
>> I'm trying something like
>>
>> if (parent is SomeComponent) {
>>   ....
>> }
>>
>> but I'm getting browser error. Can't find examples in source code or in
>> examples
>>
>>
>> Thanks
>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
>
>-- 
>Carlos Rovira
>http://about.me/carlosrovira

Reply via email to