make _depth public
This commit is contained in:
parent
110312cf62
commit
93cf919c30
|
|
@ -948,10 +948,10 @@ export class Frame extends SdkObject {
|
|||
return this._parentFrame;
|
||||
}
|
||||
|
||||
_depth(): number {
|
||||
depth(): number {
|
||||
if (!this._parentFrame)
|
||||
return 0;
|
||||
return this._parentFrame._depth() + 1;
|
||||
return this._parentFrame.depth() + 1;
|
||||
}
|
||||
|
||||
childFrames(): Frame[] {
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ export class Recorder implements InstrumentationListener, IRecorder {
|
|||
return '';
|
||||
const parts = splitSelectorByFrame(this._highlightedSelector);
|
||||
const selectorDepth = parts.length - 1;
|
||||
const frameDepth = frame._depth();
|
||||
const frameDepth = frame.depth();
|
||||
if (frameDepth < selectorDepth)
|
||||
return '';
|
||||
return stringifySelector(parts[parts.length - 1]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue