<?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>25159</bug_id>
          
          <creation_ts>2014-03-26 16:42:34 +0000</creation_ts>
          <short_desc>Specify HTMLElement.innerText and outerText</short_desc>
          <delta_ts>2014-09-17 02:36:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>Unwelcome</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>13145</dup_id>
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#elements-in-the-dom</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Michael[tm] Smith">mike</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>sideshowbarker+unwelcome</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102927</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-26 16:42:34 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#elements-in-the-dom
Complete: http://www.whatwg.org/c#elements-in-the-dom
Referrer: 

Comment:
Specify HTMLElement.innerText and outerText

Posted from: 113.23.85.162
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36 OPR/20.0.1387.59 (Edition Next)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102928</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-26 16:44:24 +0000</bug_when>
    <thetext>I added counters to see if these could be dropped from Blink, but they&apos;re used a lot:

http://www.chromestatus.com/metrics/feature/timeline/popularity/213
http://www.chromestatus.com/metrics/feature/timeline/popularity/214

In my ad-hoc testing Firefox is the only browser to not support it, so specifying it seems like the path of least resistance.

HTML, DOM, or DOM Parsing and Serialization seems like the place for this, so I&apos;m starting with where HTMLElement is defined.

I guess it wouldn&apos;t hurt to put it on Element, but that&apos;s not required for Web compat, or at least it&apos;s not where Blink/WebKit puts it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103183</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-31 17:10:59 +0000</bug_when>
    <thetext>Do you have a definition I could use to spec them? Last I checked, I couldn&apos;t figure out what they did.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103188</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-31 18:14:11 +0000</bug_when>
    <thetext>I had a look at Blink and had no idea innerText was this crazy.

The innerText getter uses the line boxes from the render tree in some way, but falls back to just textContent in the absence of a renderer.

The outerText getter is just an alias for innerText.

The innerText setters replaces newlines in the input with &lt;br&gt; elements, but also has some scary things involving the rendered.

The outerText setter looks more sane, I think it just replaces newlines with &lt;br&gt;.

I think maybe a sensible first attempt would be to reverse engineer the interoperable subset of how these properties work on elements not inserted into a document, which would be something like a &quot;semantic textContent&quot;.

If it turns out that applying CSS is needed for Web compat, this is going to be pretty ugly. I can help out with Blink use counters to determine what&apos;s Web compatible and not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103198</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-03-31 20:42:52 +0000</bug_when>
    <thetext>Aryeh worked on a spec for it before. It seems it&apos;s gone but I found some backup:

https://rawgithub.com/jackcviers/Rangy/master/spec/innerText.htm

See http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-February/030179.html

Also Selection.toString() supposedly should do the same thing as innerText.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=10583
https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-stringifier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103393</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-04-04 06:26:16 +0000</bug_when>
    <thetext>https://web.archive.org/web/20110205234444/http://aryeh.name/spec/innertext/test/innerText.html relic from the tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105344</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-07 20:43:59 +0000</bug_when>
    <thetext>I think the first step here is figuring out what these actually need to be. If it depends on CSS, which it seems likely to, then this is probably at best something for CSSOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111656</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-09-17 02:36:05 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 13145 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>