AllowHtmlPopupWindow (Silverlight Plug-in Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a value that indicates whether the hosted content in the Silverlight plug-in can use the HtmlPage.PopupWindow method to display a new browser window.

Syntax

object Element

<object ...>
  <param name="allowHtmlPopupWindow" value="bool"/>
  ...
</object>

Silverlight.js

Silverlight.CreateObject(,,,{allowHtmlPopupWindow:'bool'});
-or-
Silverlight.CreateObjectEx({properties:{allowHtmlPopupWindow:'bool'}});

JavaScript

Not available.

COM

Not available.

Managed Code

Property Value

true if the hosted content can use the HtmlPage.PopupWindow method to display a new browser window; otherwise, false. The default is true for same-domain applications and false for cross-domain applications.

Remarks

This property can only be set during Silverlight plug-in initialization, and is read-only at run time for all possible access models.

You can set this property to true in cross-domain settings to bypass browser-based popup blockers.

Caution noteCaution:

When a host page enables HTML access, it gives the Silverlight-based application complete access to its DOM, including the ability to modify content, insert and evaluate JavaScript code, and so on. This should be allowed only if the host page trusts the Silverlight-based application. By default, HTML access is enabled for same-domain Silverlight-based applications because there is implicit trust between HTML and same-domain Silverlight content. However, access must be specifically enabled for cross-domain applications. For more information, see Security Settings in HTML Bridge.

In the JavaScript API, you always have access to the HTML DOM. If you use the JavaScript API exclusively, the value of this property is ignored.

If hosting Silverlight out-of-browser, the value of this property is ignored.