@newrelic/browser-agent 1.303.0-rc.3 → 1.303.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,7 +151,6 @@ const InitModelFn = () => {
151
151
  collect_fonts: false,
152
152
  inline_images: false,
153
153
  fix_stylesheets: true,
154
- // recording config settings
155
154
  mask_all_inputs: true,
156
155
  // this has a getter/setter to facilitate validation of the selectors
157
156
  get mask_text_selector() {
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.303.0-rc.3";
20
+ const VERSION = exports.VERSION = "1.303.0-rc.5";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.303.0-rc.3";
20
+ const VERSION = exports.VERSION = "1.303.0-rc.5";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -133,7 +133,8 @@ class Recorder {
133
133
  inlineImages: inline_images,
134
134
  collectFonts: collect_fonts,
135
135
  checkoutEveryNms: _constants.CHECKOUT_MS[mode],
136
- recordAfter: 'DOMContentLoaded'
136
+ recordAfter: 'DOMContentLoaded',
137
+ slimDOMOptions: 'all'
137
138
  });
138
139
  } catch (err) {
139
140
  this.ee.emit('internal-error', [err]);
@@ -278,7 +278,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
278
278
  }
279
279
  exports.Aggregate = Aggregate;
280
280
  function getActionText(elem) {
281
- const tagName = elem.tagName.toLowerCase();
281
+ const tagName = elem.tagName?.toLowerCase();
282
282
  const elementsOfInterest = ['a', 'button', 'input'];
283
283
  if (elementsOfInterest.includes(tagName)) {
284
284
  return elem.title || elem.value || elem.innerText;
@@ -62,6 +62,7 @@ class Instrument extends _instrumentBase.InstrumentBase {
62
62
  });
63
63
  });
64
64
  const processUserInteraction = (0, _invoke.debounce)(event => {
65
+ if (document.readyState === 'loading') return; // document.body is not expected to be defined yet during loading, so only "interactive" or "complete" is considered "legit" user interaction
65
66
  (0, _handle.handle)('newUIEvent', [event], undefined, this.featureName, this.ee);
66
67
  domObserver.observe(document.body, {
67
68
  attributes: true,
@@ -628,7 +628,7 @@ class Aggregate extends _aggregateBase.AggregateBase {
628
628
  }, this.featureName, baseEE);
629
629
  baseEE.on('interaction', saveInteraction);
630
630
  function getActionText(node) {
631
- var nodeType = node.tagName.toLowerCase();
631
+ var nodeType = node.tagName?.toLowerCase();
632
632
  var goodNodeTypes = ['a', 'button', 'input'];
633
633
  var isGoodNode = goodNodeTypes.indexOf(nodeType) !== -1;
634
634
  if (isGoodNode) {
@@ -145,7 +145,6 @@ const InitModelFn = () => {
145
145
  collect_fonts: false,
146
146
  inline_images: false,
147
147
  fix_stylesheets: true,
148
- // recording config settings
149
148
  mask_all_inputs: true,
150
149
  // this has a getter/setter to facilitate validation of the selectors
151
150
  get mask_text_selector() {
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.303.0-rc.3";
14
+ export const VERSION = "1.303.0-rc.5";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.303.0-rc.3";
14
+ export const VERSION = "1.303.0-rc.5";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -126,7 +126,8 @@ export class Recorder {
126
126
  inlineImages: inline_images,
127
127
  collectFonts: collect_fonts,
128
128
  checkoutEveryNms: CHECKOUT_MS[mode],
129
- recordAfter: 'DOMContentLoaded'
129
+ recordAfter: 'DOMContentLoaded',
130
+ slimDOMOptions: 'all'
130
131
  });
131
132
  } catch (err) {
132
133
  this.ee.emit('internal-error', [err]);
@@ -270,7 +270,7 @@ export class Aggregate extends AggregateBase {
270
270
  }
271
271
  }
272
272
  function getActionText(elem) {
273
- const tagName = elem.tagName.toLowerCase();
273
+ const tagName = elem.tagName?.toLowerCase();
274
274
  const elementsOfInterest = ['a', 'button', 'input'];
275
275
  if (elementsOfInterest.includes(tagName)) {
276
276
  return elem.title || elem.value || elem.innerText;
@@ -57,6 +57,7 @@ export class Instrument extends InstrumentBase {
57
57
  });
58
58
  });
59
59
  const processUserInteraction = debounce(event => {
60
+ if (document.readyState === 'loading') return; // document.body is not expected to be defined yet during loading, so only "interactive" or "complete" is considered "legit" user interaction
60
61
  handle('newUIEvent', [event], undefined, this.featureName, this.ee);
61
62
  domObserver.observe(document.body, {
62
63
  attributes: true,
@@ -620,7 +620,7 @@ export class Aggregate extends AggregateBase {
620
620
  }, this.featureName, baseEE);
621
621
  baseEE.on('interaction', saveInteraction);
622
622
  function getActionText(node) {
623
- var nodeType = node.tagName.toLowerCase();
623
+ var nodeType = node.tagName?.toLowerCase();
624
624
  var goodNodeTypes = ['a', 'button', 'input'];
625
625
  var isGoodNode = goodNodeTypes.indexOf(nodeType) !== -1;
626
626
  if (isGoodNode) {
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA+IO,0CAEN;mBAtIY,OAAO,cAAc,EAAE,IAAI"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/common/config/init.js"],"names":[],"mappings":"AA8IO,0CAEN;mBArIY,OAAO,cAAc,EAAE,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAkCC;IApCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,uIAAuI;IACvI,yBAA4B;IAC5B,qBAAwB;IACxB,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CAyCC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAiCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BAtO8B,mBAAmB"}
1
+ {"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../../../src/features/session_replay/shared/recorder.js"],"names":[],"mappings":"AAqBA;IAUE,+BAkCC;IApCD,sBAAmB;IAGjB,iDAAiD;IACjD,kBAAgC;IAEhC,QAAyB;IACzB,mBAA6C;IAC7C,cAAqC;IAErC,qBAAwB;IACxB,0FAA0F;IAC1F,eAAkE;IAElE,iHAAiH;IACjH,uBAAgD;IAChD,mFAAmF;IACnF,iCAA0D;IAC1D,uIAAuI;IACvI,yBAA4B;IAC5B,qBAAwB;IACxB,kIAAkI;IAClI,kBAAqB;IACrB,uIAAuI;IACvI,0BAAwE;IAc1E,mBAEC;IAED;;;;;;;;;MAWC;IAED,kFAAkF;IAClF,oBAGC;IAED,qDAAqD;IACrD,8CA0CC;IAED;;;;;OAKG;IACH,aAHW,GAAC,cACD,GAAC,QAiCX;IAED,yHAAyH;IACzH,yCAiCC;IAED,0HAA0H;IAC1H,yBAOC;IAED,wBAEC;IAED,gCAAgC;IAChC,uCAGC;IAED;;;SAGK;IACL,oCAGC;;CACF;+BAvO8B,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/instrument/index.js"],"names":[],"mappings":"AAsBA;IACE,2BAAiC;IACjC,2BAkDC;IAxCG,2CAA0C;CAyC/C;AAED,wCAAiC;+BAnEF,6BAA6B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/soft_navigations/instrument/index.js"],"names":[],"mappings":"AAsBA;IACE,2BAAiC;IACjC,2BAmDC;IAzCG,2CAA0C;CA0C/C;AAED,wCAAiC;+BApEF,6BAA6B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.303.0-rc.3",
3
+ "version": "1.303.0-rc.5",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -102,7 +102,6 @@ const InitModelFn = () => {
102
102
  collect_fonts: false,
103
103
  inline_images: false,
104
104
  fix_stylesheets: true,
105
- // recording config settings
106
105
  mask_all_inputs: true,
107
106
  // this has a getter/setter to facilitate validation of the selectors
108
107
  get mask_text_selector () { return hiddenState.mask_selector },
@@ -120,7 +120,8 @@ export class Recorder {
120
120
  inlineImages: inline_images,
121
121
  collectFonts: collect_fonts,
122
122
  checkoutEveryNms: CHECKOUT_MS[mode],
123
- recordAfter: 'DOMContentLoaded'
123
+ recordAfter: 'DOMContentLoaded',
124
+ slimDOMOptions: 'all'
124
125
  })
125
126
  } catch (err) {
126
127
  this.ee.emit('internal-error', [err])
@@ -267,7 +267,7 @@ export class Aggregate extends AggregateBase {
267
267
  }
268
268
 
269
269
  function getActionText (elem) {
270
- const tagName = elem.tagName.toLowerCase()
270
+ const tagName = elem.tagName?.toLowerCase()
271
271
  const elementsOfInterest = ['a', 'button', 'input']
272
272
  if (elementsOfInterest.includes(tagName)) {
273
273
  return elem.title || elem.value || elem.innerText
@@ -60,6 +60,7 @@ export class Instrument extends InstrumentBase {
60
60
  })
61
61
 
62
62
  const processUserInteraction = debounce((event) => {
63
+ if (document.readyState === 'loading') return // document.body is not expected to be defined yet during loading, so only "interactive" or "complete" is considered "legit" user interaction
63
64
  handle('newUIEvent', [event], undefined, this.featureName, this.ee)
64
65
  domObserver.observe(document.body, { attributes: true, childList: true, subtree: true, characterData: true })
65
66
  }, UI_WAIT_INTERVAL, { leading: true })
@@ -683,7 +683,7 @@ export class Aggregate extends AggregateBase {
683
683
  baseEE.on('interaction', saveInteraction)
684
684
 
685
685
  function getActionText (node) {
686
- var nodeType = node.tagName.toLowerCase()
686
+ var nodeType = node.tagName?.toLowerCase()
687
687
  var goodNodeTypes = ['a', 'button', 'input']
688
688
  var isGoodNode = goodNodeTypes.indexOf(nodeType) !== -1
689
689
  if (isGoodNode) {