Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
requestAnimationFrame(function () {
// 在这里先筛选出首屏得元素
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth; // 筛选出top和left在 width和height得元素
var firstScreenDoms = _filterInstanceProperty(initDoms).call(initDoms, function (item) {
var dom = item.dom;
var _getOffset = getOffset(dom),
left = _getOffset.left,
top = _getOffset.top;
return left <= width && top <= height;
}); // 找出最大得时间
_sortInstanceProperty(firstScreenDoms).call(firstScreenDoms, function (itemA, itemB) {
return itemB.time - itemA.time;
}); // const maxTime = firstScreenDoms.reduce((item, time = 0) => item.time > time ? item.time : time)
var firstScreenLoadingTime = firstScreenDoms[0] ? firstScreenDoms[0].time : 0;export var get = function get(object, path, defaultValue) {
var _context;
var _path = getTag(path) === '[object Array]' ? path : _filterInstanceProperty(_context = String.prototype.split.call(path, /[,[\].]+?/)).call(_context, Boolean);
var index = 0;
var length = _path.length;
var result = function () {
while (object != null && index < length) {
object = object[_path[index++]];
}
return index && index == length ? object : undefined;
}();
return result === undefined ? defaultValue : result;
};
/**