Add a polyfill for Symbol and prototype[Symbol.iterator] to enable for..of loops
What does this MR do?
Polyfills Symbol
and Symbol.prototype.iterator
for browsers which do not natively support it. Babel currently uses these when transpiling a loop like:
for (node of nodeList) {
node.setAttribute('foo', 'bar');
}
or an array destructuring statement like:
const [foo, bar] = methodWhichReturnsAnArray();
Are there points in the code the reviewer needs to double check?
This is already used in a few places in our code like project_label_subscription.js.es6, and these won't currently execute properly in any version of Internet Explorer, or any version of Safari prior to v10.
Why was this MR needed?
^ see above
Does this MR meet the acceptance criteria?
-
Changelog entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #25188 (closed)