You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New feature (non-breaking change which adds functionality and tests!)
Breaking change (fix or feature that would cause existing functionality to change)
PR Type
Enhancement
Description
• Add OnHistoryUpdated event for BiDi browsing context
• Implement async handlers for history navigation tracking
• Create HistoryUpdatedEventArgs record class
• Create new record class for history updated events • Include BiDi, Context, Timestamp, and Url properties • Inherit from BrowsingContextEventArgs base class
The OnHistoryUpdatedAsync methods are subscribing to "browsingContext.fragmentNavigated" event instead of "browsingContext.historyUpdated". This appears to be a copy-paste error from the OnFragmentNavigatedAsync methods above.
The HistoryUpdatedEventArgs record class lacks XML documentation comments explaining its purpose and parameters, which is inconsistent with typical .NET documentation standards.
✅ Fix incorrect event subscription nameSuggestion Impact:The suggestion was directly implemented - both OnHistoryUpdatedAsync methods were updated to subscribe to the correct "browsingContext.historyUpdated" event instead of the incorrect "browsingContext.fragmentNavigated" event
The OnHistoryUpdatedAsync methods are subscribing to the wrong event name. They should subscribe to "browsingContext.historyUpdated" instead of "browsingContext.fragmentNavigated" to match their intended functionality.
Why: The suggestion correctly identifies a critical bug. The OnHistoryUpdatedAsync methods subscribe to the wrong event name, "browsingContext.fragmentNavigated", which would cause the new feature to not work as intended. The proposed fix to use "browsingContext.historyUpdated" is correct and essential for the functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
https://w3c.github.io/webdriver-bidi/#event-browsingContext-historyUpdated
💥 What does this PR do?
Implement the event.
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
• Add OnHistoryUpdated event for BiDi browsing context
• Implement async handlers for history navigation tracking
• Create HistoryUpdatedEventArgs record class
Changes walkthrough 📝
BrowsingContext.cs
Add history updated event handlersdotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContext.cs
• Add OnHistoryUpdatedAsync method with Func handler
• Add
OnHistoryUpdatedAsync method with Action handler
HistoryUpdatedEventArgs.cs
Create HistoryUpdatedEventArgs record classdotnet/src/webdriver/BiDi/BrowsingContext/HistoryUpdatedEventArgs.cs
• Create new record class for history updated events
• Include BiDi,
Context, Timestamp, and Url properties
• Inherit from
BrowsingContextEventArgs base class
BrowsingContextModule.cs
Implement history updated subscription methodsdotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContextModule.cs
• Add OnHistoryUpdatedAsync method with async Func handler
• Add
OnHistoryUpdatedAsync method with Action handler
• Both methods
subscribe to browsingContext.fragmentNavigated event