This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21823 - Having status always return empty string is not web-compatible
Summary: Having status always return empty string is not web-compatible
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 00:38 UTC by contributor
Modified: 2013-06-06 20:03 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2013-04-25 00:38:30 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html
Multipage: http://www.whatwg.org/C#browser-interface-elements
Complete: http://www.whatwg.org/c#browser-interface-elements
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Having status always return empty string is not web-compatible

Posted from: 98.110.194.206 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20130419 Firefox/23.0
Comment 1 Boris Zbarsky 2013-04-25 00:42:03 UTC
In particular it breaks any script that uses an undeclared global variable named "status".  See https://bugzilla.mozilla.org/show_bug.cgi?id=862540 and the sort of developer confusion it causes at http://stackoverflow.com/questions/16138781/firefox-20-vs-google-charts-getvalue-oddness/16139309

As far as I can tell what UAs implement is that setting window.status saves the string and getting window.status returns the last value it was set to.  Testcase:

<pre><script>
  status = { toString: function() { document.writeln('yes'); return "I am here"; } }
  document.writeln(typeof status);
  document.writeln(status);
</script>
Comment 2 Ian 'Hixie' Hickson 2013-06-06 20:01:02 UTC
So sad.
Comment 3 contributor 2013-06-06 20:03:37 UTC
Checked in as WHATWG revision r7920.
Check-in comment: window.status compat
http://html5.org/tools/web-apps-tracker?from=7919&to=7920