Hi Alex 2017-01-20 17:57 GMT+01:00 Alex Harui <aha...@adobe.com>: > > > 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" method? Whatever it is pointing to, if you can call > dialog["show"] you should also be able to call dialog.show at runtime. > The runtime should not care. >
Just uploaded "Dialog.as" in MDL library. Please take a look, I introduced comments in the lines affected You can find: COMPILE::JS private var dialog:HTMLElement; //HTMLDialogElement dialog should be HTMLDialogElement to be able to do: dialog.showModal() instead of current: dialog["showModal"](); The reason that dialog is declared as "HTMLElement" instead "HTMLDialogElement" is due the fact that Safari (and suppose Firefox too) gives error since doesn't recognize the second. When I click the button SHOW DIALOG safari throws: org.apache.flex.mdl.Dialog.prototype.createElement = function() { this.typeNames = "mdl-dialog"; this.dialog = org.apache.flex.utils.Language.as(document.createElement('dialog'), HTMLDialogElement); <---- ReferenceError: Can't find variable: HTMLDialogElement ... While Chrome works ok. But Safari should work since I'm with latest 10.0.2 http://caniuse.com/#feat=dialog So maybe is our problem? -- Carlos Rovira http://about.me/carlosrovira