Прочитај на енглеском Уреди

Делите путем


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.

C#
public object ObjectForScripting { get; [System.Security.SecurityCritical] set; }
C#
public object ObjectForScripting { get; set; }

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

Производ Верзије
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10