UNPKG

browser-x

Version:

A partial implementation of the W3C DOM API on top of an HTML5 parser and serializer.

16 lines (10 loc) 300 B
'use strict'; function NodeList(nodes) { Array.prototype.push.apply(this, nodes); } NodeList.prototype = Object.create(Object.prototype, {}); NodeList.prototype.constructor = NodeList; NodeList.prototype.item = function(index) { return this[index] || null; }; module.exports = NodeList;