Bug 1812696 - Implement FormData constructor submitter parameter r=webidl,smaug
Also improve error messages for current submitter validations Spec PR: https://github.com/whatwg/xhr/pull/366 WPT PR: https://github.com/web-platform-tests/wpt/pull/37895 Differential Revision: https://phabricator.services.mozilla.com/D167576
This commit is contained in:
@@ -296,7 +296,7 @@ void HTMLFormElement::RequestSubmit(nsGenericHTMLElement* aSubmitter,
|
||||
// 1.2. If submitter's form owner is not this form element, then throw a
|
||||
// "NotFoundError" DOMException.
|
||||
if (fc->GetForm() != this) {
|
||||
aRv.Throw(NS_ERROR_DOM_NOT_FOUND_ERR);
|
||||
aRv.ThrowNotFoundError("The submitter is not owned by this form.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user