From 9e891fde82e01cba633e5501aa72df923a25dd50 Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Sat, 18 Mar 2023 12:30:48 +0800 Subject: [PATCH] Add event-submitter-polyfill note Safari does not support submitters on submit events. This may be needed for checking which button was clicked to submit forms. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a627c29..6cfd7a5 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,12 @@ needed, the proper usages are documented via TSDoc comments. The library has been tested on the static DOM using JSDOM, and the real dynamic DOM using Cypress. This is to guarantee compatibility across environments. -See the [documentation folder](https://code.modal.sh/TheoryOfNekomata/formxtra/src/branch/master/docs) for more details on this library. +See the [documentation folder](https://code.modal.sh/TheoryOfNekomata/formxtra/src/branch/master/docs) for more details +on this library. + +You may need the [event-submitter-polyfill package](https://github.com/idea2app/event-submitter-polyfill) for browsers +that do not support the submitter property on submit events (such as Safari). The submitter element is needed for +tracking which button triggered a form submission, and it may contain `name` and `value` attributes which are used to +add values to the form (such as specifying which action to take for the rest of the form values). The sources are under the [MIT license](https://code.modal.sh/TheoryOfNekomata/formxtra/raw/branch/master/LICENSE).