Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3244 closed defect (fixed)

Nodelist:: map(), filter() etc. need doc

Reported by: bill Owned by: alex
Priority: high Milestone: 0.9
Component: Core Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Not sure if this is intended behavior or not; On IE, and similar functions return a simple array, without special methods on it, so you can't do something like:


The other problem is that those functions have no inline doc (particularly about the return value).

Change History (8)

comment:1 Changed 15 years ago by bill

Owner: changed from anonymous to alex

comment:2 Changed 15 years ago by bill

Description: modified (diff)
Summary: Nodelist:: map(), filter() etc. methods return arrays not Nodelists, and need docNodelist:: map(), filter() etc. need doc

comment:3 Changed 15 years ago by alex

(In [9953]) adding docs for many of the NodeList? methods, adding tests for some of them, improving the code structure in general to make it clear that extending NodeList? is straightforward, and expanding the unit tests to check for return types from NodeList? methods. Still more work to be done there, though. Refs #3244

comment:4 Changed 15 years ago by alex

Resolution: fixed
Status: newclosed

after much trying, I can't find space-efficient implementations of concat, slice, and splice. I'm marking this closed. We can re-open a new ticket for 1.0 regarding array-compat methods on NodeList?.

comment:5 Changed 15 years ago by alex

(In [10089]) remove some spruious function calls in the fast path on IE. Ensure that form disambiguation code still in play on IE and opera (where it's still, apparently, a problem). Refs #3244

comment:6 Changed 15 years ago by bill

Resolution: fixed
Status: closedreopened

OK, so if map() just returns a simple array need to update the comment, right?

//	summary:
//		see The primary difference is that the acted-on 
//		array is implicitly this NodeList and the return is a 
//		dojo.NodeList (a subclass of Array)

filter() is documented as returning a Nodelist, which is correct.

comment:7 Changed 15 years ago by alex

Resolution: fixed
Status: reopenedclosed

no, map returns a NodeList?, as do forEach, style, styles, place, connect, orphan, adopt, and query. Re-closing.

comment:8 Changed 15 years ago by bill

(In [10104]) make sure that map returns a NodeList?. refs #3244.

Note: See TracTickets for help on using tickets.