Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WebBrowser.ObjectForScripting Property

 

Gets or sets an instance of a public class, implemented by the host application, that can be accessed by script from a hosted document.

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

public object ObjectForScripting {
	get;
	[SecurityCriticalAttribute]
	set;
}

Property Value

Type: System.Object

The Object that is an instance of a public class, implemented by the host application, that can be accessed by script from a hosted document.

Exception Condition
ArgumentException

ObjectForScripting is set with an instance of type that is not COMVisible.

This property can be set to any COM-visible object for which you want its public properties and methods available to scripting code. You can make a class COM-visible by marking it with the ComVisibleAttribute.

The object that is set for scripting is exposed to the current document by the HTML DOM using the window.external property.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft