Edit

Share via


WebBrowser.ObjectForScripting Property

Definition

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

public:
 property System::Object ^ ObjectForScripting { System::Object ^ get(); void set(System::Object ^ value); };
public object ObjectForScripting { get; [System.Security.SecurityCritical] set; }
public object ObjectForScripting { get; set; }
[<set: System.Security.SecurityCritical>]
member this.ObjectForScripting : obj with get, set
member this.ObjectForScripting : obj with get, set
Public Property ObjectForScripting As Object

Property Value

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.

Attributes

Exceptions

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

Remarks

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.

Applies to