Polyfill for the HTML dialog element
formmethod
to override/change <form method>
, so e.g., a button could specifically force formmethod="dialog"
<form method="dialog">
inside a Shadow Root (no longer submits the form as if it was a GET)mousedown
and mouseup
events on backdropAs the polyfill doesn't insert its own CSS in either SD or regular cases, you'll need to add the CSS to the host.
Ships the polyfill as an ES Module.
The NPM-published release now contains both dist/dialog-polyfill.js
(as before) and dist/dialog-polyfill.esm.js
, which includes export default dialogPolyfill;
. See #164 for more information.
This is 0.5.0 because it could break previous users of the 0.4.x branch.
function
.method
on HTMLFormElement
. These browsers might not return "dialog" for method on <form method="dialog">
<form method="dialog">
.
.returnValue
not being set correctly.MutationObserver
.