Skip to content

Commit c0b13c8

Browse files
committed
Revert "remove support for html attribute"
This reverts commit fa43d00.
1 parent 5186362 commit c0b13c8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,12 @@ public void setIncognito(WebView view, boolean enabled) {
445445
@ReactProp(name = "source")
446446
public void setSource(WebView view, @Nullable ReadableMap source) {
447447
if (source != null) {
448+
if (source.hasKey("html")) {
449+
String html = source.getString("html");
450+
String baseUrl = source.hasKey("baseUrl") ? source.getString("baseUrl") : "";
451+
view.loadDataWithBaseURL(baseUrl, html, HTML_MIME_TYPE, HTML_ENCODING, null);
452+
return;
453+
}
448454
if (source.hasKey("uri")) {
449455
String url = source.getString("uri");
450456
String previousUrl = view.getUrl();

0 commit comments

Comments
 (0)