ump-plugin-webview
v0.0.1
Published
UMP WebView Plugin — <WebView> native view + WKWebView/Android WebView/Harmony Web bridge
Readme
ump-plugin-webview
<WebView> native view for UMP apps. Third native plugin under the
plugin-native infrastructure (after ump-plugin-video and
ump-plugin-audio).
Install
npm install ump-plugin-webviewUsage
import { WebView } from 'ump-plugin-webview';
<WebView source={{ uri: 'https://example.com' }} />Migration from ump-native
- import { WebView } from 'ump-native';
+ import { WebView } from 'ump-plugin-webview';No JS API changes. The plugin self-registers its native view kind
on app launch — no host-side edits needed beyond the standard
RegisterAll.ensureAll() call (already present after the Video
plugin migration).
What's in the box
- JS:
<WebView>JSX component declared viacreateNativeViewComponent - iOS:
UMPWebViewHostFactory(WKWebView) - Android:
UMPWebViewHost+UMPWebViewHostFactory(android.webkit.WebView) - Harmony:
UMPWebViewHost.ets(@ohos.web/Web) - C++:
webview_manager(cross-platform plumbing)
