CompositionEvent: phương thức initCompositionEvent()

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Phương thức initCompositionEvent() của giao diện CompositionEvent khởi tạo các thuộc tính của một instance đối tượng CompositionEvent.

Note: Cách đúng để tạo một CompositionEvent là sử dụng hàm tạo CompositionEvent().

Cú pháp

js
initCompositionEvent(type, canBubble, cancelable, view, data, locale)

Tham số

type

Một chuỗi biểu diễn loại sự kiện soạn thảo; đây sẽ là một trong các giá trị compositionstart, compositionupdate, hoặc compositionend.

canBubble

Một giá trị boolean chỉ định sự kiện có thể nổi bong bóng hay không.

cancelable

Một giá trị boolean cho biết sự kiện có thể bị hủy hay không.

view

Đối tượng Window mà từ đó sự kiện được tạo.

data

Một chuỗi biểu diễn giá trị của thuộc tính data.

locale

Một chuỗi biểu diễn giá trị của thuộc tính locale.

Giá trị trả về

Không có (undefined).

Đặc điểm kỹ thuật

Specification
UI Events
# dom-compositionevent-initcompositionevent

Tương thích trình duyệt

Xem thêm