daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
635 stars 235 forks source link

JS Not Working ? #1160

Open heihitesh opened 9 months ago

heihitesh commented 9 months ago

Steps to Reproduce

Add this Widget

Screenshot 2024-01-13 102223

Expected results

It not loading this Div

<div class='sk-ww-google-play-reviews' data-embed-id='251800'></div><script src='https://widgets.sociablekit.com/google-play-reviews/widget.js' async defer></script>

This should Load Screenshot 2024-01-13 102507

And the click is also not happening for this div

<button type="button" onclick="document.getElementById('demo').innerHTML = Date()"> Click me to display Date and Time.</button>

Actual results

This is shown instead

image

daohoangson commented 9 months ago

This is expected, the SCRIPT tag is not supported. If you need to render this kind of dynamic contents, a WebView would be more appropriate. See https://pub.dev/packages/webview_flutter