Polyfill for the HTML dialog element
MutationObserver
and improves catching dialog removals (while continuing to support mutation events for IE10 and below)console.warn
, and tries to allow use anywayshow
as well as showModal
registerDialog
where native support exists (forceRegisterDialog
will still make loud noise)Fixes issues-
role
to each dialog if unspecified: #63Error
objects, instead of strings, on errors: #83Fixes minor issues-
method
activeElement
element blur sanity-check for IEThis is a tiny update just to match NPM's published 0.4.1 version.
Since the last release, some highlights-
open
attribute and other state calls use the same backing value
open
is observed by the browser<form method="dialog">
and setting returnValue
Additionally, note that dialogPolyfill.registerDialog
is now a noop on browsers with dialog support, such as Chrome. If you'd like to force use of the polyfill (with unpredictable results), please call dialogPolyfill.forceRegisterDialog
.
There are still some unresolved issues in IE9/10. We'd appreciate user feedback.