ionic-team / ionic-team/capacitor
Export Native Bridge Utility Functions
- Dominant language
- TypeScript
- Stars
- 16.7k
- Forks
- 1.3k
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 10
Description
# 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`
Contributor guide
Assessment
This issue has not been assessed yet.