Web - Tai-Kimura/SwiftJsonUI GitHub Wiki
Web
class: WKWebView
Platform Support
- ✅ UIKit: Full support (All attributes available)
- ✅ SwiftUI: Full support (Maps to WKWebView wrapped in UIViewRepresentable)
Attributes for Web
| attribute name | UIKit | SwiftUI | type in json | details | remarks |
|---|---|---|---|---|---|
| url | ✅ | ✅ | string | URL to load in web view | |
| html | ✅ | ✅ Dynamic | string | HTML content to display | Dynamic mode only |
| allowsBackForwardNavigationGestures | ✅ | ✅ Dynamic | boolean | Enable swipe navigation gestures | Dynamic mode only |
| allowsLinkPreview | ✅ | ✅ Dynamic | boolean | Enable link preview on long press | Dynamic mode only |
| allowsInlineMediaPlayback | ✅ | ✅ | boolean | Allow inline media playback | |
| mediaTypesRequiringUserActionForPlayback | ✅ | ✅ | string | Media types requiring user action | |
| isOpaque | ✅ | ✅ | boolean | Opaque background | |
| customUserAgent | ✅ | ✅ | string | Custom user agent string | |
| applicationNameForUserAgent | ✅ | ✅ | string | Application name in user agent | |
| javaScriptEnabled | ✅ | ✅ | boolean | Enable JavaScript execution | |
| javaScriptCanOpenWindowsAutomatically | ✅ | ✅ | boolean | Allow JavaScript to open windows | |
| minimumFontSize | ✅ | ✅ | float | Minimum font size | |
| suppressesIncrementalRendering | ✅ | ✅ | boolean | Suppress incremental rendering | |
| ignoresViewportScaleLimits | ✅ | ✅ | boolean | Ignore viewport scale limits | |
| dataDetectorTypes | ✅ | ❌ | string | Data detector types | UIKit only |
| selectionGranularity | ✅ | ❌ | string | Selection granularity | UIKit only |