共用方式為


EnableHtmlAccess

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

Gets a value that indicates whether the hosted content in the Silverlight plug-in has access to the browser Document Object Model (DOM).

booleanValue = silverlightObject.settings.EnableHtmlAccess

Property Value

Type: Boolean

true if the hosted content has access to the browser DOM; otherwise, false.

Managed Equivalent

EnableHTMLAccess

Remarks

This property is available on the settings subobject of a Silverlight plug-in instance.

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

The script syntax shown is for using the EnableHtmlAccess property at run time. You can also set the property during initiation, using either object param syntax or the silverlight.js helper functions. See EnableHtmlAccess (Silverlight Plug-in Object).

Applies To

Silverlight Plug-in