I have followed getmdl.io's example to implement a dialog
component. It works fine in Chrome, Firefox and Android Web views; but in Safari, it renders dialog
elements even if they are not invoked. I have put the example at the end of body element just before script elements.
Any thoughts are appreciated.
Material Design Lite uses the dialog-Element, which is not supported by all browsers. (See Browser-Compatibility)
To make it work in other browsers, you have to include the dialog-polyfill. Also please note, that
<dialog>
-Elements should be located directly after the<body>
-tag and not inside any other wrappers.See codesample copied from dialog-polyfill:
Also the Dialog-Element will be removed from HTML 5.1, since chrome is the only browser that actually supports it natively. See https://github.com/w3c/html/issues/427