<?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>20019</bug_id>
          
          <creation_ts>2012-11-20 12:45:56 +0000</creation_ts>
          <short_desc>Support subclassing ES6 Map</short_desc>
          <delta_ts>2015-02-19 11:33:01 +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>PC</rep_platform>
          <op_sys>Windows 3.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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="Anne">annevk</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>simon_kaegi</cc>
    
    <cc>vic99999</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78527</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-20 12:45:56 +0000</bug_when>
    <thetext>Context: http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Nov/thread.html#msg220

URLQuery constraints: URLQuery represents an ordered list of name/value pairs and within that list duplicate names can occur. 

URLQuery API propopal: 

* new URLQuery(object) creates an ordered list of name/value pairs. We might want to support sequenced values in the object so you can create duplicate names.
* get(name) gets the value of the first matching name. 
* getAll(name) gets all values. 
* set(name, values) gets the matching items from the list and from that new list replaces their values one by one. If there&apos;s values left, appends new items to the list. If there&apos;s too few values, removes items from the list.
* add(name, values) ads new name/value pairs to the list.
* has(name) same semantics.
* delete(name [, value]) deletes all of name, or only removes those with a matching value.

name/value are also constrained in what they can contain. Percent-encoding happens for both. In addition URLQuery directly manipulates the query string of the associated URL object.

(I&apos;m not entirely happy with the set() semantics above. Maybe initially we should only support setting a single value and require add() for duplicates?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78549</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2012-11-20 18:23:18 +0000</bug_when>
    <thetext>Note that URLQuery isn&apos;t strictly a Map - it&apos;s a MultiMap, where one key can map to multiple values.

As such, we should probably check with tc39 to see if they have plans for a MultiMap API after Maps are fully adopted, and be consistent with that.

If they don&apos;t, we should at least make sure that the Map functions act appropriately for a single-value Map, and have additional functions for treating as a MultiMap (as you say, make set() take only a single value, while add() adds more values).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78550</commentid>
    <comment_count>2</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2012-11-20 18:23:57 +0000</bug_when>
    <thetext>Also, while we&apos;re doing this, we should check to see if there are any use-cases in the DOM for ES Sets, and add that at the same time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79174</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-30 10:36:50 +0000</bug_when>
    <thetext>I changed my mind a little bit relative to comment 0 (API is also changing somewhat per discussion with Tab, see http://url.spec.whatwg.org/ for the latest thinking in a couple of hours). name/value will just be type constrained. The encoding and decoding of name/value will only happen when interfacing with the other object the ordered MultiMap needs to keep in sync with.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86531</commentid>
    <comment_count>4</comment_count>
    <who name="">vic99999</who>
    <bug_when>2013-04-23 05:22:27 +0000</bug_when>
    <thetext>
Seems,
for URLQuery API a &quot;LinkedListMultiMap&quot; is required.

- something similar to
http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/LinkedListMultimap.html

for proper iteration order when serializing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118024</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-02-19 11:33:01 +0000</bug_when>
    <thetext>This use case has been solved through other means.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>