<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10694</bug_id>
          
          <creation_ts>2010-09-23 09:49:49 +0000</creation_ts>
          <short_desc>Specify window.console</short_desc>
          <delta_ts>2016-02-12 16:50:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Browser Test/Tools WG</product>
          <component>Console</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-window-object</bug_file_loc>
          <status_whiteboard>whatwg-resolved</status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Michael[tm] Smith">mike</assigned_to>
          <cc>d</cc>
    
    <cc>eoconnor</cc>
    
    <cc>ian</cc>
    
    <cc>Kathysoto411a</cc>
    
    <cc>kennyluck</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>nazrmed</cc>
    
    <cc>pastith</cc>
    
    <cc>philipj</cc>
    
    <cc>pixelparty</cc>
    
    <cc>public-browser-tools-testing</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>rayrayray111</cc>
    
    <cc>sroussey</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39197</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-09-23 09:49:49 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#the-window-object

Comment:
Specify window.console. Without it scripts around the web break because the
author left in a console.something. Not sure which members are required; Opera
has log, warn, error, info. They should be defined to either do nothing or
show the arguments converted to DOMString and joined with a U+0020 space as a
message to the user in a UA-defined way.

Posted from: 85.227.159.236</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39198</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2010-09-23 09:59:48 +0000</bug_when>
    <thetext>Actually Chrome doesn&apos;t convert the arguments to DOMString, so strike that part.

In Opera and Chrome window.console returns a Console object, but there&apos;s no Console interface object.

We should probably also make console available to workers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39202</commentid>
    <comment_count>2</comment_count>
    <who name="Kyle Simpson">w3c</who>
    <bug_when>2010-09-23 14:05:54 +0000</bug_when>
    <thetext>+1 on standardizing the console object, or at least having dummy no-op versions of the API functions standard-included in the browser.

Look at the hoops we have to jump through to normalize `console` across browsers and also for browsers without it defined:  http://blog.getify.com/2010/06/console-log-in-the-wild/

It would greatly simplify web development to have `console` standardized.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39205</commentid>
    <comment_count>3</comment_count>
    <who name="Jason McLeod">pixelparty</who>
    <bug_when>2010-09-23 14:40:30 +0000</bug_when>
    <thetext>I would love to see this happen. I often hear &quot;Hey J, it&apos;s not working in IE&quot; during the build/testing.  The first thing I check is for any calls to the console that I&apos;ve left behind.

I&apos;ve even seen people add their own functionality to assign console functions to do-nothing functions just to get around browsers that don&apos;t support it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39209</commentid>
    <comment_count>4</comment_count>
    <who name="Shelley Powers">shelleyp</who>
    <bug_when>2010-09-23 16:44:53 +0000</bug_when>
    <thetext>Disagree with having this standardized. This has nothing to do with HTML, and everything to do with web application development and JavaScript.

More importantly, saying we need this because some sloppy developer left it in a production site, and it &quot;broke&quot;, is saying that we need to codify sloppy behavior.

This is part of debugging. Chances are, you debug in one browser. Let each browser determine what is best for debugging within its own environment. By the time cross-browser testing happens, the console statements should be removed, because testing with debugging implemented is not &quot;true&quot; testing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39211</commentid>
    <comment_count>5</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-09-23 16:53:54 +0000</bug_when>
    <thetext>We added console.log and a few related calls in Safari in part because sites broke occasionally due to a stray console.log. Realistically, a new browser would have to include the console object to achieve a competitive level of compatibility.

It would be useful to spec this, but it could plausibly go in a separate spec (perhaps in Web Apps WG) since there is almost no tie-in to other things in the HTML5 spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39871</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-29 06:23:27 +0000</bug_when>
    <thetext>Yeah, this doesn&apos;t seem HTML-specific. Any takers for speccing this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39984</commentid>
    <comment_count>7</comment_count>
    <who name="Edward O&apos;Connor">hober0</who>
    <bug_when>2010-09-29 17:39:28 +0000</bug_when>
    <thetext>I think I&apos;ll take a stab at speccing window.console.

Maciej, you wrote:
&gt; We added console.log and a few related calls in Safari in part because
&gt; sites broke occasionally due to a stray console.log. Realistically, a
&gt; new browser would have to include the console object to achieve a
&gt; competitive level of compatibility.

I went looking for what the few related calls might be: when
window.console was originally added to WebKit[1], its error, info, log,
and warn methods were added. Since then, WebKit has added a bunch more
to its Console object[2]; do you have a sense for how much of that is
needed for interop with web content?


Ted

1. http://trac.webkit.org/changeset/27161
2. http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt#L2171</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39986</commentid>
    <comment_count>8</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-09-29 18:05:29 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; I think I&apos;ll take a stab at speccing window.console.
&gt; 
&gt; Maciej, you wrote:
&gt; &gt; We added console.log and a few related calls in Safari in part because
&gt; &gt; sites broke occasionally due to a stray console.log. Realistically, a
&gt; &gt; new browser would have to include the console object to achieve a
&gt; &gt; competitive level of compatibility.
&gt; 
&gt; I went looking for what the few related calls might be: when
&gt; window.console was originally added to WebKit[1], its error, info, log,
&gt; and warn methods were added. Since then, WebKit has added a bunch more
&gt; to its Console object[2]; do you have a sense for how much of that is
&gt; needed for interop with web content?
&gt; 
&gt; 
&gt; Ted
&gt; 
&gt; 1. http://trac.webkit.org/changeset/27161
&gt; 2.
&gt; http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt#L2171

The first round was driven in part by the desire to keep sites working. Most of the subsequent additions were to enable debugging compatibility between the Web Inspector and Firebug, not for stray calls left on sites.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39988</commentid>
    <comment_count>9</comment_count>
    <who name="Shelley Powers">shelleyp</who>
    <bug_when>2010-09-29 18:42:47 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; I think I&apos;ll take a stab at speccing window.console.
&gt; 
&gt; Maciej, you wrote:
&gt; &gt; We added console.log and a few related calls in Safari in part because
&gt; &gt; sites broke occasionally due to a stray console.log. Realistically, a
&gt; &gt; new browser would have to include the console object to achieve a
&gt; &gt; competitive level of compatibility.
&gt; 
&gt; I went looking for what the few related calls might be: when
&gt; window.console was originally added to WebKit[1], its error, info, log,
&gt; and warn methods were added. Since then, WebKit has added a bunch more
&gt; to its Console object[2]; do you have a sense for how much of that is
&gt; needed for interop with web content?
&gt; 
&gt; 
&gt; Ted
&gt; 
&gt; 1. http://trac.webkit.org/changeset/27161
&gt; 2.
&gt; http://trac.webkit.org/browser/trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt#L2171

I&apos;m assuming that you&apos;ll submit your spec to WebApps or another group? 

If so, since this won&apos;t be in HTML, or is considered not relevant to the HTML5 spec, can we close this bug out?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39995</commentid>
    <comment_count>10</comment_count>
    <who name="Edward O&apos;Connor">hober0</who>
    <bug_when>2010-09-29 18:53:53 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; I&apos;m assuming that you&apos;ll submit your spec to WebApps or another group? 

Most probably, yes.

&gt; If so, since this won&apos;t be in HTML, or is considered not relevant to the HTML5
&gt; spec, can we close this bug out?

Fine by me! Resolving as WONTFIX as the HTML WG won&apos;t be addressing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43819</commentid>
    <comment_count>11</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-01-05 11:55:12 +0000</bug_when>
    <thetext>For reference:

https://github.com/sideshowbarker/console-object</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59549</commentid>
    <comment_count>12</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-11-03 10:15:25 +0000</bug_when>
    <thetext>Moving this to webapps and reopening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59574</commentid>
    <comment_count>13</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-11-03 17:49:46 +0000</bug_when>
    <thetext>Mike, anything happening with your spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59679</commentid>
    <comment_count>14</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-11-07 08:09:12 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; Mike, anything happening with your spec?

Nothing new except that we made it a deliverable of the Browser Testing and Tools WG.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124821</commentid>
    <comment_count>15</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2016-02-04 06:51:37 +0000</bug_when>
    <thetext>https://console.spec.whatwg.org/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125002</commentid>
    <comment_count>16</comment_count>
      <attachid>1636</attachid>
    <who name="mike@w3.org">seancrayton81</who>
    <bug_when>2016-02-12 11:58:02 +0000</bug_when>
    <thetext>Created attachment 1636
www.google.com</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1636</attachid>
            <date>2016-02-12 11:58:02 +0000</date>
            <delta_ts>2016-02-12 11:58:02 +0000</delta_ts>
            <desc>www.google.com</desc>
            <filename>file_10694.txt</filename>
            <type>text/plain</type>
            <size>6</size>
            <attacher name="mike@w3.org">seancrayton81</attacher>
            
              <data encoding="base64">R29vZ2xl
</data>

          </attachment>
      

    </bug>

</bugzilla>