-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DuckPlayer Native PoC: Webview storage + nav coordination #3912
Conversation
# Conflicts: # DuckDuckGo/DuckPlayer/DuckPlayer.swift
# Conflicts: # DuckDuckGo-iOS.xcodeproj/project.pbxproj # DuckDuckGo/DuckPlayer/DuckPlayer.swift # DuckDuckGo/DuckPlayer/DuckPlayerView.swift
@@ -109,28 +105,3 @@ struct DuckPlayerView: View { | |||
.background(Color.black) | |||
} | |||
} | |||
|
|||
// WebView wrapper for WKWebView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved into a separate type-
} | ||
|
||
func makeUIView(context: Context) -> WKWebView { | ||
let configuration = WKWebViewConfiguration() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a bunch of privacy protections, and removed persistent storage
|
||
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? { | ||
// Prevent automatic opening of URLs in browser | ||
if let url = navigationAction.request.url { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallow window creation and other navigation
Task/Issue URL: https://app.asana.com/0/0/1209280272427911/f
Tech Design URL:
CC:
Description:
Steps to test this PR:
[DuckPlayer] Navigation request to <URL>
log message, but nothing should happen[DuckPlayer] Navigation request to <URL>
log message when tapping “Watch in Youtube” thereDefinition of Done (Internal Only):