private static void EnsureScriptInteropAllowed() { if (_isScriptInteropDisabled.Value == null) { _isScriptInteropDisabled.Value = SafeSecurityHelper.IsFeatureDisabled(SafeSecurityHelper.KeyToRead.ScriptInteropDisable); } }
private static void EnsureScriptInteropAllowed() { if (_isScriptInteropDisabled.Value == null) { _isScriptInteropDisabled.Value = SafeSecurityHelper.IsFeatureDisabled(SafeSecurityHelper.KeyToRead.ScriptInteropDisable); } (new WebBrowserPermission(WebBrowserPermissionLevel.Safe)).Demand(); }
private static void EnsureScriptInteropAllowed() { if (_isScriptInteropDisabled.Value == null) { _isScriptInteropDisabled.Value = SafeSecurityHelper.IsFeatureDisabled(SafeSecurityHelper.KeyToRead.ScriptInteropDisable); } // Similar approach as with WebBrowser.cs. if (_isScriptInteropDisabled.Value.Value) { // Feature is disabled - demand unrestricted WebBrowserPermission to hand out the script object. MS.Internal.PresentationFramework.SecurityHelper.DemandWebBrowserPermission(); } else { // Feature is enabled - demand Safe level to hand out the script object, granted in Partial Trust by default. (new WebBrowserPermission(WebBrowserPermissionLevel.Safe)).Demand(); } }