Skip to content

refactor(core)!: pass webview label to uri scheme protocol handlers#11163

Merged
lucasfernog merged 5 commits intodevfrom
refactor/uri-scheme-handler-webview-label
Sep 29, 2024
Merged

refactor(core)!: pass webview label to uri scheme protocol handlers#11163
lucasfernog merged 5 commits intodevfrom
refactor/uri-scheme-handler-webview-label

Conversation

@amrbashir
Copy link
Member

close #10691

@amrbashir amrbashir requested a review from a team as a code owner September 27, 2024 05:32
@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2024

Package Changes Through d85f06a

There are 1 changes which include tauri with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri 2.0.0-rc.16 2.0.0-rc.17

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

N: Into<String>,
T: Into<Cow<'static, [u8]>>,
H: Fn(&AppHandle<R>, http::Request<Vec<u8>>) -> http::Response<T> + Send + Sync + 'static,
H: Fn(&AppHandle<R>, http::Request<Vec<u8>>, &str) -> http::Response<T> + Send + Sync + 'static,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make this more flexible, I'd change the signature to maybe contain a single struct SchemeRequest { request: http::Request, app: AppHandle<R>, webview_label: String }
otherwise we need to break the API again when we want to add any other information

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the request should be hidden inside a struct and be kept as an argument so instead I did this Fn(UriSchemeContext<'_, R>, http::Request<Vec<u8>>) -> http::Response<T>

@lucasfernog lucasfernog merged commit 354be36 into dev Sep 29, 2024
@lucasfernog lucasfernog deleted the refactor/uri-scheme-handler-webview-label branch September 29, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] labeld uri scheme protocol

2 participants