<?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>25831</bug_id>
          
          <creation_ts>2014-05-20 18:33:45 +0000</creation_ts>
          <short_desc>Specify selection.setBaseAndExtent</short_desc>
          <delta_ts>2014-09-16 01:15:21 +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>HISTORICAL - Selection API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ben Peters">benjamp</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>benjamp</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106506</commentid>
    <comment_count>0</comment_count>
    <who name="Ben Peters">benjamp</who>
    <bug_when>2014-05-20 18:33:45 +0000</bug_when>
    <thetext>Selection.setBaseAndExtent is not defined in a standard, but it exists in WebKit and is used on the web. We should consider specifying it for compatibility. I was unable to find documentation, but there is a use case below.

http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109973</commentid>
    <comment_count>1</comment_count>
    <who name="Ben Peters">benjamp</who>
    <bug_when>2014-08-05 22:48:26 +0000</bug_when>
    <thetext>Proposed text, based on the text for collapse():

void setBaseAndExtent (Node baseNode, unsigned long baseOffset, Node extentNode, unsigned long extentOffset);

The method must throw an IndexSizeError exception if offset is negative or longer than node&apos;s length ([DOM4]). Otherwise, it must create a new range, set ([DOM4]) its start to (baseNode, baseOffset) and its and end to (extentNode, extentOffset), and set the context object&apos;s range to the newly-created range.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111568</commentid>
    <comment_count>2</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-09-16 01:15:21 +0000</bug_when>
    <thetext>Added in https://github.com/w3c/selection-api/commit/6f65ef0a55dfe60d8fce687e6b7dc6b103ae965f.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>