-
use UIViewRepresentable to show WKWebView for web content
-
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration
-
https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/usercontentcontroller
-
https://developer.apple.com/documentation/webkit/wkusercontentcontroller
-
dist | using vite | React
-
ims04... from p5js editor
WkWebViewDemo/sketches/dist
from https://github.com/jht9629-nyu/vite-react-demo.git
fails to load
Access to script at 'file:///Users/jht2/Documents/projects/_molab-repos/_course-repos/WkWebViewDemo/sketches/dist/assets/index-uU07fy29.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.
WebViewAlertsView
https://claude.ai/chat/6d205393-3949-4c29-8683-772c677510ca
handling alert in WKWebView
convert to swiftUI
Referencing instance method 'onChange(of:initial:_:)' on 'Optional' requires that 'AlertData' conform to 'Equatable'
Example url does not trigger alert, confirm or prompt
/Users/jht2/Documents/projects/_repos/let-america-be/src/js/a-main.js