Opened 9 years ago
Closed 9 years ago
#14612 closed bug (notabug)
Broken slice() interface
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | core | Version: | 1.10.2 |
Keywords: | dbr | Cc: | |
Blocked by: | Blocking: |
Description
Slice takes a 0-indexed start position and a 1-indexed end position, "cleverly" described as 'the 0-indexed position where elements stop being selected'. Or, in other words, a 1-indexed ending position.
What's really awful is that the traditional slice interface is offset,length -- not offset_start,offset_end.
Most of jQuery's quirks make sense in the context of JavaScript, but this is just flat-out incorrect design.
Change History (1)
comment:1 Changed 9 years ago by
Component: | unfiled → core |
---|---|
Keywords: | dbr added |
Resolution: | → notabug |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Arguments for jQuery's slice are in perfect Harmony with ECMA-262... we even pass them directly to the native method.