Class CustomEvent

Class CustomEvent

Namespace: Aspose.Html.Dom.Events
Assembly: Aspose.HTML.dll (25.1.0)

Các sự kiện sử dụng giao diện CustomEvent có thể được sử dụng để mang dữ liệu tùy chỉnh.

[ComVisible(true)]
[DOMName("CustomEvent")]
[DOMObject]
public class CustomEvent : Event, INotifyPropertyChanged

Kế thừa

objectDOMObjectEventCustomEvent

Thực hiện

INotifyPropertyChanged

Các thành viên kế thừa

Event.NonePhase, Event.CapturingPhase, Event.AtTargetPhase, Event.BubblingPhase, Event.InitEvent(string, bool, bool), Event.PreventDefault(), Event.StopPropagation(), Event.StopImmediatePropagation(), Event.Bubbles, Event.Cancelable, Event.CurrentTarget, Event.EventPhase, Event.Target, Event.TimeStamp, Event.Type, Event.DefaultPrevented, Event.IsTrusted, DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Các hàm khởi tạo

CustomEvent(string)

Khởi tạo một thể hiện mới của lớp Aspose.Html.Dom.Events.CustomEvent.

[DOMConstructor]
public CustomEvent(string type)

Tham số

type string

Loại sự kiện.

CustomEvent(string, IDictionary<string, object="">)

Khởi tạo một thể hiện mới của lớp Aspose.Html.Dom.Events.CustomEvent.

[DOMConstructor]
public CustomEvent(string type, IDictionary<string, object=""> eventInitDict)

Tham số

type string

Loại sự kiện.

eventInitDict IDictionary<string, object&gt;

Từ điển khởi tạo sự kiện.

Thuộc tính

Detail

Lấy dữ liệu tùy chỉnh.

[DOMName("detail")]
public object Detail { get; }

Giá trị thuộc tính

object

Phương thức

InitCustomEvent(string, bool, bool, object)

/// Phương thức Aspose.Html.Dom.Events.Event.InitEvent(System.String,System.Boolean,System.Boolean) được sử dụng để khởi tạo giá trị của một Aspose.Html.Dom.Events.Event được tạo ra thông qua giao diện Aspose.Html.Dom.Events.IDocumentEvent.

[DOMName("initCustomEvent")]
public void InitCustomEvent(string type, bool bubbles, bool cancelable, object detail)

Tham số

type string

Loại sự kiện.

bubbles bool

nếu được đặt thành true [bubbles].

cancelable bool

nếu được đặt thành true [cancelable].

detail object

Dữ liệu tùy chỉnh.

Nhận xét

Phương thức này chỉ có thể được gọi trước khi sự kiện đã được phát đi thông qua phương thức Aspose.Html.Dom.Events.IEventTarget.DispatchEvent(Aspose.Html.Dom.Events.Event), mặc dù nó có thể được gọi nhiều lần trong giai đoạn đó nếu cần. Nếu được gọi nhiều lần, lần gọi cuối cùng sẽ được ưu tiên. Nếu được gọi từ một lớp con của giao diện Event, chỉ các giá trị được chỉ định trong phương thức initEvent sẽ được sửa đổi, tất cả các thuộc tính khác sẽ không thay đổi.

 Tiếng Việt