make _depth public

This commit is contained in:
Simon Knott 2024-11-04 10:53:44 +01:00
parent 110312cf62
commit 93cf919c30
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 3 additions and 3 deletions

View file

@ -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[] {

View file

@ -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]);