<?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>18362</bug_id>
          
          <creation_ts>2012-07-23 14:18:20 +0000</creation_ts>
          <short_desc>Make stringifiers not take into account expandos</short_desc>
          <delta_ts>2014-02-03 21:42:04 +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>All</rep_platform>
          <op_sys>Windows 3.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>[v1]</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger">Ms2ger</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>travil</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71313</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-07-23 14:18:20 +0000</bug_when>
    <thetext>See &lt;http://w3c-test.org/html/tests/submission/Ms2ger/the-elements-of-html/text-level-semantics/the-a-element/a-stringifier.html&gt; for a test. I think it makes more sense to directly call the real implementation rather than to pay attention to random properties scripts put on the object; this would also match current implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79792</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-12-10 04:43:35 +0000</bug_when>
    <thetext>I don&apos;t know, I tend to think that for example

  interface Blah {
    stringifier readonly attribute DOMString something;
  };

means

  Object.defineProperty(Blah.prototype, &quot;something&quot;,
                        { get: function() { return &lt;internal state&gt;; }, ...);
  Blah.prototype.toString = function() { return this.something; }

rather than

  Object.defineProperty(Blah.prototype, &quot;something&quot;,
                        { get: function() { return &lt;internal state&gt;; }, ...);
  Blah.prototype.toString = function() { return &lt;internal state&gt;; }

and I feel like it is a more natural way of implementing it.  It&apos;s in line with what we&apos;re doing for [PutForwards], too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79796</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-10 05:07:08 +0000</bug_when>
    <thetext>&gt; and I feel like it is a more natural way of implementing it.

Is that compatible with what happens on the DOM objects that have stringifiers right now (like HTMLAnchorElement, say)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79798</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-12-10 05:11:47 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Is that compatible with what happens on the DOM objects that have
&gt; stringifiers right now (like HTMLAnchorElement, say)?

var a = document.createElement(&quot;a&quot;); a.setAttribute(&quot;href&quot;, &quot;no:&quot;); Object.defineProperty(a, &quot;href&quot;, { value: &quot;yes&quot; }); alert(a)

says no...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79807</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-10 06:00:04 +0000</bug_when>
    <thetext>&gt; says no...

In which browsers, just to check?

But given that, reopening...  I&apos;m not sure I want the compat can of worms of changing how &lt;a&gt; behaves.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79808</commentid>
    <comment_count>5</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-12-10 06:04:28 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; In which browsers, just to check?

In Firefox, Chrome and Opera.

&gt; But given that, reopening...  I&apos;m not sure I want the compat can of worms of
&gt; changing how &lt;a&gt; behaves.

All right.  I figured it was not going to be likely that people would be redefining/overriding .href with ES5 stuff, but I&apos;ll defer to your judgement of how many worms there are in that can. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79810</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-10 06:07:33 +0000</bug_when>
    <thetext>Worth checking Safari and IE too, I bet.

As for number of worms... Maybe I&apos;m overworrying this.  I&apos;d love feedback from other implementors on how happy they are to change this behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79811</commentid>
    <comment_count>7</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-10 06:09:25 +0000</bug_when>
    <thetext>Oh, one other note.  Right now, anonymous stringifiers _do_ return &lt;internal state&gt;, so even if stringifiers keep on seeing expandos we could make &lt;a&gt; work: it would have to use an anonymous stringifier defined in prose to return the same thing as href.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79859</commentid>
    <comment_count>8</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-12-10 20:38:36 +0000</bug_when>
    <thetext>IE10 fails tests 2&amp;3, 6&amp;7 with the following:

assert_throws: function &quot;function() { aObject.toString(); }&quot; did not throw</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91569</commentid>
    <comment_count>9</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-08-03 07:34:35 +0000</bug_when>
    <thetext>We no longer delegate using [[Get]] and [[Call]], and instead just run whatever prose the operation/attribute defines.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.663;r2=1.664;f=h
http://dev.w3.org/cvsweb/2006/webapi/WebIDL/v1.xml.diff?r1=1.104;r2=1.105;f=h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99642</commentid>
    <comment_count>10</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2014-02-03 21:42:04 +0000</bug_when>
    <thetext>https://github.com/w3c/web-platform-tests/pull/599</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>