Print messages in JS console for existing exceptions in code. Bug 289297, r=doron+smaug, a=mkaply
git-svn-id: svn://10.0.0.236/trunk@171889 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -60,7 +60,7 @@ nsXFormsSendElement::HandleAction(nsIDOMEvent* aEvent,
|
||||
|
||||
NS_NAMED_LITERAL_STRING(submission, "submission");
|
||||
nsAutoString submissionID;
|
||||
mElement->GetAttribute(NS_LITERAL_STRING("submission"), submissionID);
|
||||
mElement->GetAttribute(submission, submissionID);
|
||||
if (submissionID.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
@@ -73,6 +73,9 @@ nsXFormsSendElement::HandleAction(nsIDOMEvent* aEvent,
|
||||
doc->GetElementById(submissionID, getter_AddRefs(el));
|
||||
|
||||
if (!el || !nsXFormsUtils::IsXFormsElement(el, submission)) {
|
||||
const PRUnichar *strings[] = { submissionID.get(), submission.get() };
|
||||
nsXFormsUtils::ReportError(NS_LITERAL_STRING("idRefError"),
|
||||
strings, 2, mElement, mElement);
|
||||
return nsXFormsUtils::DispatchEvent(mElement, eEvent_BindingException);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user