-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[dotnet] [bidi] Add OnHistoryUpdated event #15916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] [bidi] Add OnHistoryUpdated event #15916
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Ci is failing not related to this PR. |
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 handlers
dotnet/src/webdriver/BiDi/BrowsingContext/BrowsingContext.cs
• Add OnHistoryUpdatedAsync method with Func handler
• Add
OnHistoryUpdatedAsync method with Action handler
HistoryUpdatedEventArgs.cs
Create HistoryUpdatedEventArgs record class
dotnet/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 methods
dotnet/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