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 to make a
@extern. Hope Alex could teach me changing my implementation with the
@extern or guide me...but I spend several hours trying things since I don't
find any doc to learn on how to do it.

b) inject_html is working from a CDN, finally the errors was a silly
mistake I did declaring the urls, but... hope Alex could implement the
proposal of insert the scripts (css and js) in SWC, since it seems to me
that depends on a hosted version that is not the official one, doesn't like
me. (We get MDL script from MDL site...and I think that is ok since is
the official web of MDL, but we as well can do the same and insert the MDL
scripts in SWC).

c) Rest of methods had to change to brackets notation as well....awful

for example dialog["show"]();   instead of dialog.show();

This is due to the fact that Chrome know about HTMLDialogElement but Safari
/ Firefox doesn't so we must downgrade to use HTMLElement, and this class
doesn't have the referred methods. So I think that notation here, although
awful is valid, since I don't know other way to make it work...

In resume. Things are working, but hope we could change some of this points
since is not a good implementation IMHO

Thanks


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

Reply via email to