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
This commit is contained in:
Michał Gołębiowski
2015-06-01 23:25:38 +02:00
parent 9c8a3ecdc4
commit bb026fc12c
12 changed files with 97 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
{
"preset": "jquery",
"excludeFiles": [ "external", "src/intro.js", "src/outro.js" ]
"excludeFiles": [ "external", "src/intro.js", "src/outro.js",
"test/node_smoke_tests/lib/ensure_iterability.js" ]
}