<?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>27941</bug_id>
          
          <creation_ts>2015-02-02 08:59:37 +0000</creation_ts>
          <short_desc>URLSearchParams and HTMLFormElement</short_desc>
          <delta_ts>2017-02-10 15:27:17 +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>URL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>block.rxckin.beats</cc>
    
    <cc>brettz9</cc>
    
    <cc>d</cc>
    
    <cc>mike</cc>
    
    <cc>rubys</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>117654</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-02-02 08:59:37 +0000</bug_when>
    <thetext>It&apos;s been suggested twice now to make URLSearchParams accept HTMLFormElement just like FormData does. This would e.g. help with manipulating a URL based on a &lt;form&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117711</commentid>
    <comment_count>1</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2015-02-05 15:49:08 +0000</bug_when>
    <thetext>So this is just a lossy translation for forms containing &lt;input type=&quot;file&quot;&gt;? That seems like a bad incongruity between FormData and URLSearchParams that makes URLSearchParams less of a fit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117715</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-02-05 19:06:22 +0000</bug_when>
    <thetext>It does the same as &lt;form&gt; would do for application/x-www-form-urlencoded (its default behavior, by the way).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117732</commentid>
    <comment_count>3</comment_count>
    <who name="Jxck">block.rxckin.beats</who>
    <bug_when>2015-02-07 02:54:44 +0000</bug_when>
    <thetext>+1 for Anne.

some discussion on discourse
http://discourse.specifiction.org/t/formdata-and-urlsearchparams-on-form-urlencoded-in-xhr/742</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117752</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2015-02-08 21:30:11 +0000</bug_when>
    <thetext>I guess so. It&apos;d be the first part of the URL API to start depending on non-browser environments, which is kind of sad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122580</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-08-13 08:13:45 +0000</bug_when>
    <thetext>I see two ways around that:

1. &lt;form&gt; supports a generic protocol whereby another object can ask it for a specific serialization and it then iterates over its entries and invokes `append()` on that other object.

2. We leave `FormData` as a special case and introduce `toURLSearchParams()` directly on &lt;form&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128439</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-02-10 15:27:17 +0000</bug_when>
    <thetext>I&apos;m going to close this for now. I didn&apos;t get any new requests for this. HTML &lt;form&gt; exporting a URLSearchParams seems like a better API too if we are to ever do this (even though that would be inconsistent with FormData).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>