Deployment.ExternalCallersFromCrossDomain Property

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

Gets a value that indicates the level of access that cross-domain callers have to the Silverlight-based application in this deployment.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public ReadOnly Property ExternalCallersFromCrossDomain As CrossDomainAccess
public CrossDomainAccess ExternalCallersFromCrossDomain { get; }
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" ExternalCallersFromCrossDomain="CrossDomainAccess" .../>

Property Value

Type: System.Windows.CrossDomainAccess
A value that indicates the access level of cross-domain callers.

Remarks

Dependency property identifier field: ExternalCallersFromCrossDomainProperty

The ExternalCallersFromCrossDomain property controls JavaScript and HTML DOM access to scriptable objects defined in cross-domain .xap files.

The attribute has no effect in same-domain .xap files. By default, access is disabled in cross-domain .xap files.

The ExternalCallersFromCrossDomain property accepts two values: ScriptableOnly and NoAccess.

When the property is set to ScriptableOnly, the host's native JavaScript can only access scriptable objects that the Silverlight-based application code registers with the runtime. It cannot query or set properties on any other objects. Additionally, it will not receive event notifications.

Caution noteCaution:

The ScriptableOnly value will allow a cross-domain .xap file to programmatically call any scriptable objects that are explicitly exposed by the application.

When the ExternalCallersFromCrossDomain property is set to NoAccess, scriptable entry points and creatable types are not available to JavaScript or the DOM.

For more information, see Security Settings in HTML Bridge.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.