<?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>21591</bug_id>
          
          <creation_ts>2013-04-05 12:13:28 +0000</creation_ts>
          <short_desc>String constant on NavigatorID is invalid per WebIDL</short_desc>
          <delta_ts>2013-07-09 20:28:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#client-identification</bug_file_loc>
          <status_whiteboard>[v1]</status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>22041</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>annevk</cc>
    
    <cc>brendan</cc>
    
    <cc>cam</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>robin</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85599</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-04-05 12:13:28 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html
Multipage: http://www.whatwg.org/C#client-identification
Complete: http://www.whatwg.org/c#client-identification

Comment:
String constant on NavigatorID is invalid per WebIDL

Posted from: 81.242.195.27 by ms2ger@gmail.com
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130301 Firefox/22.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85600</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-04-05 12:14:48 +0000</bug_when>
    <thetext>Either make it a simple readonly attribute or make Cameron allow it, I guess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85988</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-11 22:23:58 +0000</bug_when>
    <thetext>heycam, let&apos;s allow it! :-D

This relates to the last interesting line of this IDL block:

[NoInterfaceObject]
interface NavigatorID {
  readonly attribute DOMString appName;
  readonly attribute DOMString appVersion;
  readonly attribute DOMString platform;
  readonly attribute DOMString userAgent;

  const DOMString product = &quot;Gecko&quot;; // for historical reasons
};</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86006</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-11 23:05:06 +0000</bug_when>
    <thetext>Constants appear on both the interface object and on the prototype. In this case, there&apos;s no interface object because of [NoInterfaceObject], but it still seems wrong conceptually to use a constant for .product.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86016</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-12 06:49:20 +0000</bug_when>
    <thetext>If there was some WebIDL way of defining an attribute that always returned a single value but didn&apos;t appear on the prototype, that would be even better. I agree that the type of constant that appears on the interface isn&apos;t what I&apos;m looking for here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86020</commentid>
    <comment_count>5</comment_count>
    <who name="Brendan Eich">brendan</who>
    <bug_when>2013-04-12 07:16:05 +0000</bug_when>
    <thetext>  static const DOMString product = &quot;Gecko&quot;; // for historical reasons

?

/be</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86021</commentid>
    <comment_count>6</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-04-12 07:23:13 +0000</bug_when>
    <thetext>static attributes already exist, if you were happy to to do the &apos;Return &quot;Gecko&quot;.` bit in prose.  Otherwise static const seems reasonable to me.  And probably preferable, since it would result in a data property rather than an accessor property.

I don&apos;t understand the objection to use a constant if the value is indeed constant, by the way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86022</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-04-12 07:34:45 +0000</bug_when>
    <thetext>The attribute should only be on the prototype, not on the interface object. static does the opposite.

I think what is requested here is the equivalent of

[[
interface Foo {
 readonly attribute DOMString product;
};

The `product` attribute must return the string &quot;Gecko&quot;.
]]

Since this is a legacy feature, I&apos;m not convinced WebIDL should support dedicated syntax for it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86242</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-15 22:00:47 +0000</bug_when>
    <thetext>Yeah I&apos;m just trying to avoid having prose for this legacy feature, the same way that people keep having me avoid prose where I can avoid it by using other features like defaults for optional arguments, enums, etc. :-)

heycam: If you don&apos;t want to support this, just reassign it to me and I&apos;ll use prose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90343</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-07-04 08:23:02 +0000</bug_when>
    <thetext>I understand the desire to avoid writing prose, but I don&apos;t understand why we&apos;d want string constants in IDL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90513</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-09 20:26:28 +0000</bug_when>
    <thetext>FYI, I don&apos;t need this for HTML anymore. I made it all prose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90515</commentid>
    <comment_count>11</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-07-09 20:28:36 +0000</bug_when>
    <thetext>WONTFIX since nobody came up with a compelling use case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>