@arms/rum-browser
Advanced tools
Comparing version 0.0.23 to 0.0.24-beta.1
@@ -1,3 +0,3 @@ | ||
"use strict";exports.__esModule=!0,exports["default"]=void 0;var _rumCore=require("@arms/rum-core"),_base=require("../../utils/base"),_url=require("../../utils/url"),_global=require("../../utils/global"),PerfCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="perf-collector",this.ctx=void 0,this.sendEvent=void 0,this.sendPerf=function(){setTimeout(function(){var b=performance.getEntriesByType("navigation")[0],c=b.loadEventEnd,d=b.domInteractive,e=b.domContentLoadedEventEnd,f=b.domComplete,g=performance.getEntriesByType("paint").find(function(a){var b=a.name;return"first-contentful-paint"===b})||{},h=g.startTime;a.sendEvent({event_type:_rumCore.RumEventType.VIEW,type:"perf",url:(0,_url.getCurrentURL)(),referrer:_global.document.referrer||"",loading_type:"initial_load",timing_data:JSON.stringify(b),// Measure | ||
"use strict";exports.__esModule=!0,exports["default"]=void 0;var _rumCore=require("@arms/rum-core"),_base=require("../../utils/base"),_url=require("../../utils/url"),_global=require("../../utils/global"),PerfCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="perf-collector",this.ctx=void 0,this.sendEvent=void 0,this.sendPerf=function(){setTimeout(function(){var b=performance.getEntriesByType("navigation")[0];if(b){var c=b.loadEventEnd,d=b.domInteractive,e=b.domContentLoadedEventEnd,f=b.domComplete,g=performance.getEntriesByType("paint").find(function(a){var b=a.name;return"first-contentful-paint"===b})||{},h=g.startTime;a.sendEvent({event_type:_rumCore.RumEventType.VIEW,type:"perf",url:(0,_url.getCurrentURL)(),referrer:_global.document.referrer||"",loading_type:"initial_load",timing_data:JSON.stringify(b),// Measure | ||
// loading_time: formatNumber(loadEventEnd), // 同FMP,基于DOM突变稳定来计算 | ||
first_contentful_paint:(0,_base.formatNumber)(h),dom_interactive:(0,_base.formatNumber)(d),dom_content_loaded:(0,_base.formatNumber)(e),dom_complete:(0,_base.formatNumber)(f),load_event:(0,_base.formatNumber)(c)})},0)}}var b=a.prototype;return b.setup=function setup(a,b){var c=a.getConfig(),d=c.collectors,e=void 0===d?{}:d;!1===e.perf||(this.ctx=a,this.sendEvent=b,_global.global.addEventListener("load",this.sendPerf))},b.destroy=function destroy(){_global.global.removeEventListener("load",this.sendPerf)},a}(); | ||
first_contentful_paint:(0,_base.formatNumber)(h),dom_interactive:(0,_base.formatNumber)(d),dom_content_loaded:(0,_base.formatNumber)(e),dom_complete:(0,_base.formatNumber)(f),load_event:(0,_base.formatNumber)(c)})}},0)}}var b=a.prototype;return b.setup=function setup(a,b){var c=a.getConfig(),d=c.collectors,e=void 0===d?{}:d;!1===e.perf||(this.ctx=a,this.sendEvent=b,_global.global.addEventListener("load",this.sendPerf))},b.destroy=function destroy(){_global.global.removeEventListener("load",this.sendPerf)},a}(); |
{ | ||
"name": "@arms/rum-browser", | ||
"version": "0.0.23", | ||
"version": "0.0.24-beta.1", | ||
"description": "arms rum javascript sdk for browser", | ||
@@ -5,0 +5,0 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38737