var slice = window.dispatchEvent ? function(nodes, start, end) { return [].slice.call(nodes, start, end); } : function(nodes, start, end) { var ret = [],n = nodes.length; if (end === void 0 || typeof end === "number" && isFinite(end)) {start = parseInt(start, 10) || 0;//void 0的目的是获取纯正的undefined,undefined原则上可以被重写end = end == void 0 ? n : parseInt(end, 10);if (start < 0) { start += n;}if (end > n) { end = n;}if (end < 0) { end += n;}for (var i = start; i < end; ++i) { ret[i - start] = nodes[i];} } return ret; };