kriszyp / put-selector

A high-performance, lightweight function for creating and manipulating DOM elements with succinct, elegant, familiar CSS selector-based syntax
Other
290 stars 39 forks source link

Put element should return the element #9

Closed neonstalwart closed 12 years ago

neonstalwart commented 12 years ago

i found this issue by trying some of the array stuff like

this.outerNode = put(".outer", [
  this.innerNode = put(".inner")
]);

the put(".inner") gets executed first and returns an element. following the code through, when the array gets processed as part of the outer call to put, it's effectively the element in the array is processed in a way that is equivalent to put(element). this PR fixes a bug where that wouldn't return anything and so made this use of arrays ineffective.