Bug 494705 - Deprecate DOM3 Load (XMLDocument.load), r=sicking

This commit is contained in:
timeless@mozdev.org 2010-04-12 18:59:00 -07:00
Родитель 995de512e5
Коммит e456393314
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -314,9 +314,23 @@ nsXMLDocument::SetAsync(PRBool aAsync)
return NS_OK;
}
static void
ReportUseOfDeprecatedMethod(nsIDocument *aDoc, const char* aWarning)
{
nsContentUtils::ReportToConsole(nsContentUtils::eDOM_PROPERTIES,
aWarning,
nsnull, 0,
aDoc->GetDocumentURI(),
EmptyString(), 0, 0,
nsIScriptError::warningFlag,
"DOM3 Load");
}
NS_IMETHODIMP
nsXMLDocument::Load(const nsAString& aUrl, PRBool *aReturn)
{
ReportUseOfDeprecatedMethod(this, "UseOfDOM3LoadMethodWarning");
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = PR_FALSE;

Просмотреть файл

@ -55,6 +55,7 @@ UseOfReleaseEventsWarning=Use of releaseEvents() is deprecated. To upgrade your
UseOfRouteEventWarning=Use of routeEvent() is deprecated. To upgrade your code, use the DOM 2 dispatchEvent() method. For more help http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent
UseOfPreventBubbleWarning=Event=%S, use of preventBubble() is deprecated. Use W3C standard stopPropagation() instead.
UseOfPreventCaptureWarning=Event=%S, use of preventCapture() is deprecated. Use W3C standard stopPropagation() instead.
UseOfDOM3LoadMethodWarning=Use of Document.load() is deprecated. To upgrade your code, use the DOM XMLHttpRequest object. For more help https://developer.mozilla.org/en/XMLHttpRequest
UnexpectedCanvasVariantStyle=canvas: an attempt to set strokeStyle or fillStyle to a value that is neither a string, a CanvasGradient, or a CanvasPattern was ignored.
EmptyGetElementByIdParam=Empty string passed to getElementById().
LowMemoryTitle=Warning: Low memory