[whatwg] Can we deprecate alert(), confirm(), prompt() ?

On Fri, Jun 10, 2011 at 2:35 PM, Aryeh Gregor <Simetrical+w3c at gmail.com> wrote:
>> Do we have any data on whether these warnings have any useful effect?
>
> I don't, but then, browsers barely ever emit such warnings. ?So it
> would be worth trying to mark some methods as deprecated in this
> fashion and see if it's useful, if browsers are interested in going
> along with it. ?I'd predict that it would help out some percentage of
> savvier authors. ?Currently some authors try to avoid writing code
> that validators tell them is bad, so it's a good guess that some would
> try to avoid writing code that browsers tell them is bad.

In theory Gecko emits a bunch of warnings for obsolete bits.

http://mxr.mozilla.org/mozilla-central/source/dom/locales/en-US/chrome/dom/dom.properties?rev=c551b62cf2e8&mark=53-62#53

53 DocumentAllUsed=Non-standard document.all property was used. Use
W3C standard document.getElementById() instead.
54 GlobalScopeElementReference=Element referenced by ID/NAME in the
global scope. Use W3C standard document.getElementById() instead.
55 UseOfCaptureEventsWarning=Use of captureEvents() is deprecated. To
upgrade your code, use the DOM 2 addEventListener() method. For more
help http://developer.mozilla.org/en/docs/DOM:element.addEventListener
56 UseOfReleaseEventsWarning=Use of releaseEvents() is deprecated. To
upgrade your code, use the DOM 2 removeEventListener() method. For
more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener
57 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
58 UseOfPreventBubbleWarning=Event=%S, use of preventBubble() is
deprecated. Use W3C standard stopPropagation() instead.
59 UseOfPreventCaptureWarning=Event=%S, use of preventCapture() is
deprecated. Use W3C standard stopPropagation() instead.
60 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
61 UnexpectedCanvasVariantStyle=canvas: an attempt to set strokeStyle
or fillStyle to a value that is neither a string, a CanvasGradient, or
a CanvasPattern was ignored.
62 EmptyGetElementByIdParam=Empty string passed to getElementById().

Warning: Non-standard document.all property was used. Use W3C standard
document.getElementById() instead.
Source File: data:text/html,<script>document.all.foo</script>
Line: 1

Is one example.

Received on Sunday, 12 June 2011 14:00:11 UTC