This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20570 - Remove the indexed deleter. It is the only one in the platform and this type of API is not preferred.
Summary: Remove the indexed deleter. It is the only one in the platform and this type ...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 11:50 UTC by contributor
Modified: 2013-09-12 20:36 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2013-01-05 11:50:23 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#datatransferitemlist
Complete: http://www.whatwg.org/c#datatransferitemlist

Comment:
Remove the indexed deleter. It is the only one in the platform and this type
of API is not preferred.

Posted from: 82.161.179.17 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.5 Safari/537.22
Comment 1 Ian 'Hixie' Hickson 2013-03-06 22:36:58 UTC
It is by far not the only one, and personally I think it _is_ preferred. :-)
Comment 2 Anne 2013-03-07 11:06:34 UTC
It is the only one. Point me to another IDL block.
Comment 3 Ian 'Hixie' Hickson 2013-04-12 23:06:22 UTC
DOMStringMap, DOMElementMap, and Storage, at least, all have deleters.
Comment 4 Ian 'Hixie' Hickson 2013-04-12 23:10:59 UTC
(Not to mention Object and Array, of course.)
Comment 5 Anne 2013-04-13 08:14:39 UTC
WebIDL distinguishes between "indexed property deleters" and "named property deleters". This is the only example of the former.
Comment 6 Ian 'Hixie' Hickson 2013-04-24 00:38:17 UTC
Even if we only look at deleters that take numeric inputs, Array has one.

But I don't understand why we would. What's the relevant difference? Just because these are indexed by number rather than string, they shouldn't be deletable? A deleter is a deleter, why care what the type of the argument is, other than for internal WebIDL reasons.
Comment 7 Cameron McCormack 2013-04-24 01:07:11 UTC
Arrays can be sparse.  Other APIs don't allow sparse indexed properties.  I don't think we want to make our APIs have sparse indexed properties, and I also don't think we want to have the properties "shift over" to fill in the gap.
Comment 8 Ian 'Hixie' Hickson 2013-04-27 00:00:59 UTC
I guess the shifting over behaviour is unusual. Fair enough.
Comment 9 contributor 2013-04-27 00:01:58 UTC
Checked in as WHATWG revision r7857.
Check-in comment: Change indexed deleter to a method.
http://html5.org/tools/web-apps-tracker?from=7856&to=7857
Comment 10 Chris Dumez 2013-08-12 14:01:30 UTC
(In reply to comment #9)
> Checked in as WHATWG revision r7857.
> Check-in comment: Change indexed deleter to a method.
> http://html5.org/tools/web-apps-tracker?from=7856&to=7857

It seems the non-normative green box was not updated. It still mentions:
- delete items[index]
But does not mention:
- remove(index)

Link:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#datatransferitemlist
Comment 11 contributor 2013-09-12 20:36:54 UTC
Checked in as WHATWG revision r8181.
Check-in comment: Update DataTransferItemList domintro to match recent changes to deleter
http://html5.org/tools/web-apps-tracker?from=8180&to=8181