We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e2a9933 + b8dc16c commit e5e24d0Copy full SHA for e5e24d0
lib/src/replaced_element.dart
@@ -212,12 +212,15 @@ class IframeContentElement extends ReplacedElement {
212
213
@override
214
Widget toWidget(RenderContext context) {
215
+ final sandboxMode = attributes["sandbox"];
216
return Container(
217
width: width ?? (height ?? 150) * 2,
218
height: height ?? (width ?? 300) / 2,
219
child: WebView(
220
initialUrl: src,
- javascriptMode: JavascriptMode.unrestricted,
221
+ javascriptMode: sandboxMode == null || sandboxMode == "allow-scripts"
222
+ ? JavascriptMode.unrestricted
223
+ : JavascriptMode.disabled,
224
navigationDelegate: navigationDelegate,
225
gestureRecognizers: {
226
Factory(() => PlatformViewVerticalGestureRecognizer())
0 commit comments