Re: [FlexJS] How to change a node at runtime

2016-11-04 Thread Carlos Rovira
> Sent from my LG G3, an AT&T 4G LTE smartphone > > -- Original message-- > *From: *Carlos Rovira > *Date: *Fri, Nov 4, 2016 2:23 AM > *To: *dev@flex.apache.org; > *Subject:*Re: [FlexJS] How to change a node at runtime > > Hi Yishayw, > > in MDL there

Re: [FlexJS] How to change a node at runtime

2016-11-04 Thread Alex Harui
What errors do you get after replacing? Sent from my LG G3, an AT&T 4G LTE smartphone -- Original message-- From: Carlos Rovira Date: Fri, Nov 4, 2016 2:23 AM To: dev@flex.apache.org; Subject:Re: [FlexJS] How to change a node at runtime Hi Yishayw, in MDL there's a Badge

Re: [FlexJS] How to change a node at runtime

2016-11-04 Thread Carlos Rovira
pose a > with using MXML and anyone could position the badge > relative to the Label as he wants. > > Just some thoughts... ;-) > > Thanks, > Olaf > > > > -- > View this message in context: http://apache-flex- > development.2333347.n4.nabble.com/FlexJS-How-t

Re: [FlexJS] How to change a node at runtime

2016-11-04 Thread OK
with using MXML and anyone could position the badge relative to the Label as he wants. Just some thoughts... ;-) Thanks, Olaf -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-How-to-change-a-node-at-runtime-tp56205p56243.html Sent from the Apache

Re: [FlexJS] How to change a node at runtime

2016-11-04 Thread Carlos Rovira
ouldn't change Element.tagName in JS. Why do you > need that option? In which scenario would it not be better to just replace > the component with a different one with a different element? > > > > -- > View this message in context: http://apache-flex- > development.

Re: [FlexJS] How to change a node at runtime

2016-11-03 Thread yishayw
fferent element? -- View this message in context: http://apache-flex-development.247.n4.nabble.com/FlexJS-How-to-change-a-node-at-runtime-tp56205p56233.html Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] How to change a node at runtime

2016-11-03 Thread Carlos Rovira
forgot to mention that I use element = link as WrappedHTMLElement; between both code blocks 2016-11-03 20:08 GMT+01:00 Carlos Rovira : > Ok, I get it with something like this: > > var link:HTMLElement = document.createElement('a') as HTMLElement; > element.parentNode.replaceChild(link, element)

Re: [FlexJS] How to change a node at runtime

2016-11-03 Thread Carlos Rovira
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

[FlexJS] How to change a node at runtime

2016-11-03 Thread Carlos Rovira
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 wo