Quantcast
Channel: Pale Moon forum
Viewing all articles
Browse latest Browse all 1981

Web Compatibility Support • Re: Kagi.com

$
0
0
"requestSubmit" is an alternate form of programmatically submitting a form which, apparently, someone thought was a good idea to introduce. Kagi doesn't seem to provide the (recommended) fallback to the time-tested "submit" for forms if "requestsubmit" isn't supported by the browser. I don't think we currently support the alternative method for programmatically submitting the forms.

They can gracefully support us without much of a drawback by using the following example to handle it:

CODE:

let myForm = document.querySelector("form");let submitButton = myForm.querySelector("#main-submit");if (myForm.requestSubmit) {  if (submitButton) {    myForm.requestSubmit(submitButton);  } else {    myForm.requestSubmit();  }} else {  myForm.submit();}


Viewing all articles
Browse latest Browse all 1981

Trending Articles