Ok, I get it with something like this:

var link:HTMLElement = document.createElement('a') as HTMLElement;
element.parentNode.replaceChild(link, element);

but after that component gets a bit crazy.

I finaly use:

positioner = element;
positioner.style.position = 'relative';
element.flexjs_wrapper = this;

but this gives javascript errors.
it seems that code on "createElement" is not replicable after initialization

right?




2016-11-03 19:13 GMT+01:00 Carlos Rovira <carlosrov...@apache.org>:

> Hi,
>
> I'm implementing a component that could be implemented with different HTML
> elements.
> Depending of what we want we could start with "a", "span" or "div".
> So I would need to replace the node at runtime so users could change the
> structure maybe with a "type" propoerty.
>
> I'm trying to make this work with luck. Could someone share some code
> snipet on how to change the current "element" of a UIBase with other
> HTMLElement ?
>
> Thanks
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to