5

GitHub - nuxodin/dialog-polyfill: "insert and thats it"-dialog-polyfil...

 2 years ago
source link: https://github.com/nuxodin/dialog-polyfill
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

dialog-element-polyfill

Lightweight polyfill (2kb) for the dialog element.

Ussage

<script src="https://cdn.jsdelivr.net/gh/nuxodin/[email protected]/dialog.min.js" type="module"></script>

Thats it!

Limitations

  • Just modern browsers (no IE)
  • You have to style backdrops like this:
dialog::backdrop ,
dialog + .backdrop {
  background-color: blue;
}

Similar Projects

From Google:

https://github.com/GoogleChrome/dialog-polyfill
Disadvantages:

  • Your need to register every Element like this: dialogPolyfill.registerDialog(dialog)
  • The CSS is not included in the js file
  • > 6kb, 2 requests

Help / Feedback

Please provide feedback by opening an issue or pull request, would make me very happy.
Features requests are also welcome.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK