Skip to content

Commit 81021f6

Browse files
authored
FrameManager - Add new frames via AsyncDictionaryHelper.AddItem (#2049)
- Previously only the Main frame created via OnFrameNavigatedAsync would resolve the async Task when waiting. Other frames were directly added to the dictionary
1 parent f4edc39 commit 81021f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/PuppeteerSharp/FrameManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ private void OnFrameAttached(CDPSession session, string frameId, string parentFr
452452
{
453453
var parentFrame = _frames[parentFrameId];
454454
var frame = new Frame(this, parentFrame, frameId, session);
455-
_frames[frame.Id] = frame;
455+
_asyncFrames.AddItem(frame.Id, frame);
456456
FrameAttached?.Invoke(this, new FrameEventArgs(frame));
457457
}
458458
}

0 commit comments

Comments
 (0)