Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
Ok Alex, I change to your proposal and is working ok I think we can close here. As a bonus, if you finaly work on allow resources in SWC let me know to change the dialogPolyfill from be injected from a CDN to hosted in the MDL SWC Thanks! Carlos 2017-01-21 0:21 GMT+01:00 Alex Harui : > OK, I

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Alex Harui
OK, I think I get it. The code "if (!dialog.showModal)" is a test for a dynamic property being added, but when dialog is declared as HTMLDialogElement, it assumes the object has a showModal method. IMO, it is a bug that dialog.showModal in an if condition outputs a call to Language.closure, but r

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
I send too quickly. I want to ask you if the sentence *f (!dialog.showModal) {* not working could be considered a bug, or maybe here the brackets notation is correct btw, I think that without count this issue, all is right now :) 2017-01-20 23:55 GMT+01:00 Carlos Rovira : > Hi Alex > > in t

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
Hi Alex in the code below you can see that at the end dialog.showModal() works now (as well dialog.close()) but *if (!dialog.showModal) {* not works. to make it works I change to : if (!dialog["showModal"]) { org.apache.flex.mdl.Dialog.prototype.showModal = function() { if (!this.lockDialog

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Alex Harui
The link appears to show a stack trace. What is the Dialog.js code around those line numbers? -Alex On 1/20/17, 12:09 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >Hi Alex, > >I modified as you said: > >/** > * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLEl

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
Hi Alex, I modified as you said: /** * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement * @flexjsignorecoercion HTMLDialogElement */ COMPILE::JS override protected function createElement():WrappedHTMLElement { typeNames = "mdl-dia

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Alex Harui
On 1/20/17, 9:47 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >sorry in > >http://caniuse.com/#feat=dialog > >Safari 10 is in red and so "not >supported" > >And for that reason we are forced to use brackets notation and HTMLElement >right? I

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
sorry in http://caniuse.com/#feat=dialog Safari 10 is in red and so "not supported" And for that reason we are forced to use brackets notation and HTMLElement right? 2017-01-20 18:45 GMT+01:00 Carlos Rovira : > Hi Alex > > 2017-01-20 17:57 GMT+01:00 Alex Haru

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
Hi Alex 2017-01-20 17:57 GMT+01:00 Alex Harui : > > > I guess I still don't understand. What code is referencing > HTMLDialogElement? Or is the code calling > createElement("HTMLDialogElement")? > > And then, in Safari, what is the dialog variable pointing to and how can > it have a "show" metho

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Alex Harui
On 1/20/17, 3:04 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >Hi Alex > >2017-01-20 1:25 GMT+01:00 Alex Harui : > >> >> >> Are you sure you have to do this? > > >Of Course no If I can solve :) > > >> IMO, if the typedefs have an >> HTMLDialogElement with a "show" method, the

Re: [FlexJS] MDL Dialog working cross browser

2017-01-20 Thread Carlos Rovira
Hi Alex 2017-01-20 1:25 GMT+01:00 Alex Harui : > > > Are you sure you have to do this? Of Course no If I can solve :) > IMO, if the typedefs have an > HTMLDialogElement with a "show" method, the compiler should let you call > dialog.show(). If dialog["show"] works in Safari/FireFox then it s

Re: [FlexJS] MDL Dialog working cross browser

2017-01-19 Thread Alex Harui
On 1/19/17, 4:15 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" wrote: >c) Rest of methods had to change to brackets notation as wellawful > >for example dialog["show"](); instead of dialog.show(); > >This is due to the fact that Chrome know about HTMLDialogElement but >Safari >

[FlexJS] MDL Dialog working cross browser

2017-01-19 Thread Carlos Rovira
Hi, MDL Dialog is working. But: The good: Is working...in Chrome, Safari and Firefox The bad: Don't like the dirty implementation a) I used Harbs suggestion to invoke the dialogPolyfill -> window[“dialogPolyfill”].registerDialog(dialog) That works, and go that route since I didn't find the way