Opened 11 years ago
Closed 11 years ago
#9649 closed defect (fixed)
Nodelist appendTo/prependTo - wrong return value
Reported by: | Les | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | General | Version: | 1.3.2 |
Keywords: | NodeList | Cc: | |
Blocked By: | Blocking: |
Description
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/NodeList-manipulate.html
Evaluate in Firebug:
dojo.query(".foo").prependTo('#t')
Dojo should return all (8) inserted elements (as in jQuery), but an array of length 1 is returned.
Also, please write inline documentation for the return value of the appendTo() and prependTo() method.
Change History (4)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Owner: | changed from anonymous to James Burke |
Oops, yeah a silly bug. I should have a fix soon, thanks for the catch.
As for the documentation, the inline docs for each of the mentioned methods talks about the nodes in the current node list are returned and not the queries nodes, in the "description" area of the inline docs. Is the wording just bad or where you expecting that kind of text somewhere else in the inline docs?
comment:3 Changed 11 years ago by
Some functions describe the returned value in the "returns" area, but in many places the returned value is described in the function description. The documentation would be more consistent if the "returns" area was added for all functions that return a value.
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
insertAfter() and insertBefore() should also return the inserted elements. Currently, only the first element is returned e.g.: