You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
218 B

5 years ago
  1. class NodeList extends Array {
  2. constructor(a) {
  3. super((a && a.length) || 0);
  4. if (a) {
  5. for (var idx in a) { this[idx] = a[idx]; }
  6. }
  7. }
  8. item(i) { return this[i] || null; }
  9. }