Hi, Om, whatever thing we do to get the best implementation the better, so great that you give it a look.
I checked the files and I was going through examples, but I think I'm doing similar to that code for example. the button in flexjs is: element = document.createElement('button') as WrappedHTMLElement; positioner = element; positioner.style.position = 'relative'; element.flexjs_wrapper = this; className = typeNames = "mdl-button mdl-js-button"; And then we use as I wrote in the samples of previous email I was using this url to see what HTML code we should get: https://getmdl.io/components/index.html#buttons-section Maybe getting the source code as our source along with the sample page is both beneficial. So great that you give it a try. As Alex suggest, the version I'm doging is not based in such if statement...so I think for that way we are in sync 2016-10-24 20:44 GMT+02:00 Alex Harui <aha...@adobe.com>: > Interesting. I didn't realize that MDL was more than just CSS. > > If you look at their init() method, it does exactly what I would NOT want > most FlexJS widgets to do. It runs an if statement on the classList to > decide which elements to generate. Of course, the MDL library can call > their code, and probably should in order to stay in sync with any changes, > but it illustrates how with FlexJS we could create concrete classes for > the various different sub-dom trees and over hundreds of buttons, save > quite a bit of code from running. > > So, no opinions either way, but we do have an opportunity to improve on > their implementation by not running their init() method. > > -Alex > > On 10/24/16, 11:17 AM, "omup...@gmail.com on behalf of OmPrakash > Muppirala" <omup...@gmail.com on behalf of bigosma...@gmail.com> wrote: > > >All (especially Carols and Alex), > > > >I have been following the conversations in the other thread about the > >approach to bring Material Design Lite (MDL) theme to FlexJS. I was > >browsing through the Button.js class in MDL's implementation [1] > > > >My first instinct was to simply mimic how the implementation is being > >done, > >because it looks very similar to the generated JS code from FlexJS. But, > >what if we simply use the same exact code and use it as the backend source > >for the js:Button we want to implement? Something along the lines of our > >CreateJS component set. > > > >The code itself is Apache licensed and as per the instructions, it simply > >uses standard HTML controls and builds on top of it. > > > >If there are no obvious issues you can see, I would start experimenting > >with this approach soon. > > > >Thanks, > >Om > > > >[1] > >https://github.com/google/material-design-lite/blob/mdl- > 1.x/src/button/but > >ton.js > >[2] > >https://github.com/google/material-design-lite/blob/mdl- > 1.x/src/INTRODUCTI > >ON.md > > -- Carlos Rovira Director General M: +34 607 22 60 05 http://www.codeoscopic.com http://www.avant2.es Este mensaje se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC S.A. La finalidad de dicho tratamiento es facilitar la prestación del servicio o información solicitados, teniendo usted derecho de acceso, rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación necesaria.