Skip to content

Export Native Bridge Utility Functions #8255

@sahilsharda

Description

@sahilsharda

Issue Title: Export Native Bridge Utility Functions

Description

The native-bridge.ts file in @capacitor/core contains useful utility functions isRelativeOrProxyUrl and createProxyUrl that are currently internal. There are TODO comments in the code suggesting these should be exported.

Exporting these functions would allow plugins and other parts of the system to correctly handle Capacitor-proxied URLs, improving consistency and reducing code duplication.

Proposed Solution

  • Update CapacitorInstance interface in definitions-internal.ts to include these methods.
  • Attach isRelativeOrProxyUrl and createProxyUrl to the Capacitor global object in native-bridge.ts.
  • Remove the TODO comments.

Related Code

  • core/native-bridge.ts
  • core/src/definitions-internal.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions