Skip to content

Define behavior of browsingContext.navigate for javascript: URLs #1123

@whimboo

Description

@whimboo

The browsingContext.navigate command currently has no special handling for javascript: URLs and the await a navigation logic compared to WebDriver classic. The algorithm parses the URL, creates a request, and delegates to the HTML spec's Navigate algorithm.

However, javascript: URLs have unique semantics compared to regular navigations. They execute script and may or may not result in an actual navigation depending on the return value. This can lead to unclear behavior, particularly around:

  • What the wait parameter means for a javascript: URL that doesn't produce a document
  • What url value should be returned in the NavigateResult
  • Whether navigation in the result should be null
  • Which navigation events (if any) should be emitted

The spec should either:

  1. Explicitly define how javascript: URLs interact with the navigate algorithm, or
  2. Return an invalid argument error for javascript: URLs, since script.evaluate / script.callFunction provide a more appropriate way to execute JavaScript.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions