]> source.dussan.org Git - jquery.git/commit
Core: Make jQuery objects iterable 2369/head
authorMichał Gołębiowski <m.goleb@gmail.com>
Mon, 1 Jun 2015 21:25:38 +0000 (23:25 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Sat, 13 Jun 2015 21:14:36 +0000 (23:14 +0200)
commitbb026fc12c3c2ad37f47f0919e484bddcdc3d291
tree7ba8975dcfd6c912f8ecb71761648ad4a38efe9b
parent9c8a3ecdc46156afd8f93aa44b6e6aea7c52c049
Core: Make jQuery objects iterable

Make iterating over jQuery objects possible using ES 2015 for-of:

    for ( node of $( "<div id=narwhal>" ) ) {
        console.log( node.id ); // "narwhal"
    }

Fixes gh-1693
12 files changed:
.gitignore
.jscsrc
.jshintignore
Gruntfile.js
build/tasks/node_smoke_tests.js
package.json
src/core.js
test/.jshintrc
test/node_smoke_tests/iterable_with_native_symbol.js [new file with mode: 0644]
test/node_smoke_tests/iterable_with_symbol_polyfill.js [new file with mode: 0644]
test/node_smoke_tests/lib/ensure_iterability_es6.js [new file with mode: 0644]
test/unit/core.js