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
Be more closer to the spec. Actually this type is interface. I am reading the spec (example https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadEnd) as many types might include some another. In .NET it is impossible to inherit from multiple types, but we can from interfaces.
🔗 Related Issues
💥 What does this PR do?
Try to interpretate the spec as is. If new property will be added in BaseNavigationInfo type, we can add it easy, and into all other dependent types.
PR Type
Enhancement
Description
Introduce IBaseNavigationInfo interface for BiDi navigation types
Implement interface in existing NavigationInfo record
Align .NET implementation with WebDriver BiDi specification
Enable multiple inheritance pattern for navigation info types
Diagram Walkthrough
flowchart LR
A["IBaseNavigationInfo Interface"] --> B["NavigationInfo Record"]
A --> C["Future Navigation Types"]
B --> D["BiDi Spec Compliance"]
Introducing a public interface is a breaking API change if consumers relied on concrete record members only. Confirm intended public exposure and versioning implications.
Ensure all interface properties are correctly exposed by the record (nullability, naming, types) and align with BiDi spec; verify Url non-null and Navigation optional semantics.
In the IBaseNavigationInfo interface, change the Url property from string to nullable string? to improve API safety and more accurately represent cases where a URL may not be available.
Why: This is a good API design suggestion that uses C#'s nullable reference types to make the interface contract more robust and explicit, forcing consumers to handle cases where a URL might not be present.
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/#cddl-type-browsingcontextbasenavigationinfo
Be more closer to the spec. Actually this type is interface. I am reading the spec (example https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadEnd) as many types might include some another. In .NET it is impossible to inherit from multiple types, but we can from interfaces.
🔗 Related Issues
💥 What does this PR do?
Try to interpretate the spec as is. If new property will be added in
BaseNavigationInfotype, we can add it easy, and into all other dependent types.PR Type
Enhancement
Description
Introduce
IBaseNavigationInfointerface for BiDi navigation typesImplement interface in existing
NavigationInforecordAlign .NET implementation with WebDriver BiDi specification
Enable multiple inheritance pattern for navigation info types
Diagram Walkthrough
File Walkthrough
IBaseNavigationInfo.cs
Add IBaseNavigationInfo interface definitiondotnet/src/webdriver/BiDi/BrowsingContext/IBaseNavigationInfo.cs
NavigationInfo.cs
Implement interface in NavigationInfo recorddotnet/src/webdriver/BiDi/BrowsingContext/NavigationInfo.cs